Permalink
Browse files

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.
  • Loading branch information...
carlosantoniodasilva committed Jul 31, 2014
1 parent 7dd452c commit d97ba0d31bd10cd793649dbeb9e972edf3934fa7
Showing with 3 additions and 5 deletions.
  1. +3 −5 actionpack/test/dispatch/routing_test.rb
@@ -4292,11 +4292,9 @@ def test_enforce_with_string
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

0 comments on commit d97ba0d

Please sign in to comment.