diff options
Diffstat (limited to 'actionpack/test/controller')
-rw-r--r-- | actionpack/test/controller/new_render_test.rb | 17 |
1 files changed, 15 insertions, 2 deletions
diff --git a/actionpack/test/controller/new_render_test.rb b/actionpack/test/controller/new_render_test.rb index febb4023d3..2701b6a462 100644 --- a/actionpack/test/controller/new_render_test.rb +++ b/actionpack/test/controller/new_render_test.rb @@ -9,6 +9,12 @@ module Fun end end +module NewRenderTestHelper + def rjs_helper_method_from_module + page.visual_effect :highlight + end +end + class NewRenderTestController < ActionController::Base layout :determine_layout @@ -178,11 +184,18 @@ class NewRenderTestController < ActionController::Base render :action => "potential_conflicts" end + helper NewRenderTestHelper + helper do + def rjs_helper_method(value) + page.visual_effect :highlight, value + end + end + def enum_rjs_test render :update do |page| page.select('.product').each do |value| - page.visual_effect :highlight - page.visual_effect :highlight, value + page.rjs_helper_method_from_module + page.rjs_helper_method(value) page.sortable(value, :url => { :action => "order" }) page.draggable(value) end |