From d97ba0d31bd10cd793649dbeb9e972edf3934fa7 Mon Sep 17 00:00:00 2001 From: Carlos Antonio da Silva Date: Wed, 30 Jul 2014 23:48:22 -0300 Subject: 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. --- actionpack/test/dispatch/routing_test.rb | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) (limited to 'actionpack') 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 -- cgit v1.2.3