diff options
author | Carlos Antonio da Silva <carlosantoniodasilva@gmail.com> | 2014-07-30 23:48:22 -0300 |
---|---|---|
committer | Carlos Antonio da Silva <carlosantoniodasilva@gmail.com> | 2014-07-31 08:10:37 -0300 |
commit | d97ba0d31bd10cd793649dbeb9e972edf3934fa7 (patch) | |
tree | 47e0d7873674459d530f36295b904ab9377fd834 | |
parent | 7dd452cc892c402a944d5a22f83c74a49a054baa (diff) | |
download | rails-d97ba0d31bd10cd793649dbeb9e972edf3934fa7.tar.gz rails-d97ba0d31bd10cd793649dbeb9e972edf3934fa7.tar.bz2 rails-d97ba0d31bd10cd793649dbeb9e972edf3934fa7.zip |
Remove unnecessary call to #tap
This is not storying the RouteSet instance anywhere as the other
examples in the file, so no need to use #tap.
-rw-r--r-- | actionpack/test/dispatch/routing_test.rb | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/actionpack/test/dispatch/routing_test.rb b/actionpack/test/dispatch/routing_test.rb index 269c7b4159..b8e20c52a0 100644 --- a/actionpack/test/dispatch/routing_test.rb +++ b/actionpack/test/dispatch/routing_test.rb @@ -4292,11 +4292,9 @@ end class TestCallableConstraintValidation < ActionDispatch::IntegrationTest def test_constraint_with_object_not_callable assert_raises(ArgumentError) do - ActionDispatch::Routing::RouteSet.new.tap do |app| - app.draw do - ok = lambda { |env| [200, { 'Content-Type' => 'text/plain' }, []] } - get '/test', to: ok, constraints: Object.new - end + ActionDispatch::Routing::RouteSet.new.draw do + ok = lambda { |env| [200, { 'Content-Type' => 'text/plain' }, []] } + get '/test', to: ok, constraints: Object.new end end end |