aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/test/controller
diff options
context:
space:
mode:
Diffstat (limited to 'actionpack/test/controller')
-rw-r--r--actionpack/test/controller/helper_test.rb6
-rw-r--r--actionpack/test/controller/routing_test.rb8
2 files changed, 7 insertions, 7 deletions
diff --git a/actionpack/test/controller/helper_test.rb b/actionpack/test/controller/helper_test.rb
index 5b9feb3630..342cbfbcd3 100644
--- a/actionpack/test/controller/helper_test.rb
+++ b/actionpack/test/controller/helper_test.rb
@@ -127,7 +127,7 @@ class HelperTest < Test::Unit::TestCase
end
def test_all_helpers
- methods = AllHelpersController.master_helper_module.instance_methods.map(&:to_s)
+ methods = AllHelpersController.master_helper_module.instance_methods.map {|m| m.to_s}
# abc_helper.rb
assert methods.include?('bare_a')
@@ -171,11 +171,11 @@ class HelperTest < Test::Unit::TestCase
private
def expected_helper_methods
- TestHelper.instance_methods.map(&:to_s)
+ TestHelper.instance_methods.map {|m| m.to_s }
end
def master_helper_methods
- @controller_class.master_helper_module.instance_methods.map(&:to_s)
+ @controller_class.master_helper_module.instance_methods.map {|m| m.to_s }
end
def missing_methods
diff --git a/actionpack/test/controller/routing_test.rb b/actionpack/test/controller/routing_test.rb
index 6b08a04b10..c2acc03a1b 100644
--- a/actionpack/test/controller/routing_test.rb
+++ b/actionpack/test/controller/routing_test.rb
@@ -1623,13 +1623,13 @@ class RouteSetTest < Test::Unit::TestCase
set.draw { |m| m.connect ':controller/:action/:id' }
path, extras = set.generate_extras(:controller => "foo", :action => "bar", :id => 15, :this => "hello", :that => "world")
assert_equal "/foo/bar/15", path
- assert_equal %w(that this), extras.map(&:to_s).sort
+ assert_equal %w(that this), extras.map { |e| e.to_s }.sort
end
def test_extra_keys
set.draw { |m| m.connect ':controller/:action/:id' }
extras = set.extra_keys(:controller => "foo", :action => "bar", :id => 15, :this => "hello", :that => "world")
- assert_equal %w(that this), extras.map(&:to_s).sort
+ assert_equal %w(that this), extras.map { |e| e.to_s }.sort
end
def test_generate_extras_not_first
@@ -1639,7 +1639,7 @@ class RouteSetTest < Test::Unit::TestCase
end
path, extras = set.generate_extras(:controller => "foo", :action => "bar", :id => 15, :this => "hello", :that => "world")
assert_equal "/foo/bar/15", path
- assert_equal %w(that this), extras.map(&:to_s).sort
+ assert_equal %w(that this), extras.map { |e| e.to_s }.sort
end
def test_generate_not_first
@@ -1656,7 +1656,7 @@ class RouteSetTest < Test::Unit::TestCase
map.connect ':controller/:action/:id'
end
extras = set.extra_keys(:controller => "foo", :action => "bar", :id => 15, :this => "hello", :that => "world")
- assert_equal %w(that this), extras.map(&:to_s).sort
+ assert_equal %w(that this), extras.map { |e| e.to_s }.sort
end
def test_draw