aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/lib/action_view/test_case.rb
diff options
context:
space:
mode:
authorSantiago Pastorino <santiago@wyeworks.com>2011-01-12 12:14:00 -0200
committerSantiago Pastorino <santiago@wyeworks.com>2011-01-12 12:14:00 -0200
commit6062d434f174c84a18a121b025dcf4f11d6689f1 (patch)
tree782bd5a01299a8167ca10eb93178119ecde6d3d4 /actionpack/lib/action_view/test_case.rb
parentf8700038afdaea80cad34a4fca005e1ef068b53e (diff)
downloadrails-6062d434f174c84a18a121b025dcf4f11d6689f1.tar.gz
rails-6062d434f174c84a18a121b025dcf4f11d6689f1.tar.bz2
rails-6062d434f174c84a18a121b025dcf4f11d6689f1.zip
Allow view in AV::TestCase to access it's controller helpers methods
Diffstat (limited to 'actionpack/lib/action_view/test_case.rb')
-rw-r--r--actionpack/lib/action_view/test_case.rb1
1 files changed, 1 insertions, 0 deletions
diff --git a/actionpack/lib/action_view/test_case.rb b/actionpack/lib/action_view/test_case.rb
index 4026f7a40e..72d17143f5 100644
--- a/actionpack/lib/action_view/test_case.rb
+++ b/actionpack/lib/action_view/test_case.rb
@@ -157,6 +157,7 @@ module ActionView
def view
@view ||= begin
view = ActionView::Base.new(ActionController::Base.view_paths, {}, @controller)
+ view.singleton_class.send :include, @controller._helpers
view.singleton_class.send :include, _helpers
view.singleton_class.send :include, @controller._routes.url_helpers
view.singleton_class.send :delegate, :alert, :notice, :to => "request.flash"