aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/test/template/erb
diff options
context:
space:
mode:
authorwycats <wycats@gmail.com>2010-04-03 02:30:06 -0700
committerwycats <wycats@gmail.com>2010-04-03 02:44:02 -0700
commit3eb97531b8650db5cc7b9558cc3828c56a526b6a (patch)
tree70f28e707c552b3be295fff52ab387e901698825 /actionpack/test/template/erb
parent13004d4f849682772060371273fda3312dd3b884 (diff)
downloadrails-3eb97531b8650db5cc7b9558cc3828c56a526b6a.tar.gz
rails-3eb97531b8650db5cc7b9558cc3828c56a526b6a.tar.bz2
rails-3eb97531b8650db5cc7b9558cc3828c56a526b6a.zip
Refactored url_for in AV to have its own instances of the helpers instead of proxying back to the controller. This potentially allows for more standalone usage of AV. It also kicked up a lot of dust in the tests, which were mocking out controllers to get this behavior. By moving it to the view, it made a lot of the tests more standalone (a win)
Diffstat (limited to 'actionpack/test/template/erb')
-rw-r--r--actionpack/test/template/erb/helper.rb11
1 files changed, 2 insertions, 9 deletions
diff --git a/actionpack/test/template/erb/helper.rb b/actionpack/test/template/erb/helper.rb
index 7147178849..799f9e4036 100644
--- a/actionpack/test/template/erb/helper.rb
+++ b/actionpack/test/template/erb/helper.rb
@@ -1,20 +1,13 @@
module ERBTest
class ViewContext
- mock_controller = Class.new do
- include SharedTestRoutes.url_helpers
- end
-
+ include SharedTestRoutes.url_helpers
include ActionView::Helpers::TagHelper
include ActionView::Helpers::JavaScriptHelper
include ActionView::Helpers::FormHelper
- attr_accessor :output_buffer
+ attr_accessor :output_buffer, :controller
def protect_against_forgery?() false end
-
- define_method(:controller) do
- mock_controller.new
- end
end
class BlockTestCase < ActiveSupport::TestCase