diff options
author | Erik Michaels-Ober <sferik@gmail.com> | 2014-10-27 17:28:53 +0100 |
---|---|---|
committer | Erik Michaels-Ober <sferik@gmail.com> | 2014-11-29 11:53:24 +0100 |
commit | d1374f99bf3090f3e659687c112ed0c5c0865cfb (patch) | |
tree | e87455ea620155254511180cc1f08c5544ed195c /actionpack/test/controller | |
parent | 56e47cf66d2e3009b4032d0cd2ceb1a6e5e42573 (diff) | |
download | rails-d1374f99bf3090f3e659687c112ed0c5c0865cfb.tar.gz rails-d1374f99bf3090f3e659687c112ed0c5c0865cfb.tar.bz2 rails-d1374f99bf3090f3e659687c112ed0c5c0865cfb.zip |
Pass symbol as an argument instead of a block
Diffstat (limited to 'actionpack/test/controller')
-rw-r--r-- | actionpack/test/controller/filters_test.rb | 2 | ||||
-rw-r--r-- | actionpack/test/controller/routing_test.rb | 8 |
2 files changed, 5 insertions, 5 deletions
diff --git a/actionpack/test/controller/filters_test.rb b/actionpack/test/controller/filters_test.rb index b2b01b3fa9..38533dbf23 100644 --- a/actionpack/test/controller/filters_test.rb +++ b/actionpack/test/controller/filters_test.rb @@ -10,7 +10,7 @@ class ActionController::Base def before_actions filters = _process_action_callbacks.select { |c| c.kind == :before } - filters.map! { |c| c.raw_filter } + filters.map!(&:raw_filter) end end diff --git a/actionpack/test/controller/routing_test.rb b/actionpack/test/controller/routing_test.rb index f46b32e019..9caa5cbe57 100644 --- a/actionpack/test/controller/routing_test.rb +++ b/actionpack/test/controller/routing_test.rb @@ -884,13 +884,13 @@ class RouteSetTest < ActiveSupport::TestCase set.draw { get ':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 { |e| e.to_s }.sort + assert_equal %w(that this), extras.map(&:to_s).sort end def test_extra_keys set.draw { get ':controller/:action/:id' } extras = set.extra_keys(:controller => "foo", :action => "bar", :id => 15, :this => "hello", :that => "world") - assert_equal %w(that this), extras.map { |e| e.to_s }.sort + assert_equal %w(that this), extras.map(&:to_s).sort end def test_generate_extras_not_first @@ -900,7 +900,7 @@ class RouteSetTest < ActiveSupport::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 { |e| e.to_s }.sort + assert_equal %w(that this), extras.map(&:to_s).sort end def test_generate_not_first @@ -918,7 +918,7 @@ class RouteSetTest < ActiveSupport::TestCase get ':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 { |e| e.to_s }.sort + assert_equal %w(that this), extras.map(&:to_s).sort end def test_draw |