Use def setup instead of setup do

`setup do` creates unnecessary allocations of proc objects in callbacks.
This prevents that from happening and results in faster code.
This commit is contained in:
eileencodes 2015-03-12 08:23:43 -04:00
parent 9c655f1275
commit 044f9ab7a4

@ -32,13 +32,15 @@ def create_fixtures(*fixture_set_names, &block)
end
class ActionController::TestCase
setup do
def setup
@routes = Rails.application.routes
super
end
end
class ActionDispatch::IntegrationTest
setup do
def setup
@routes = Rails.application.routes
super
end
end