@api private
Wraps `setup` calls from within Rails' testing framework in `before` hooks.
# File lib/rspec/rails/adapters.rb, line 14 def setup(*methods) methods.each do |method| if method.to_s =~ %r^setup_(fixtures|controller_request_and_response)$/ prepend_before { send method } else before { send method } end end end
@api private
Wraps `teardown` calls from within Rails' testing framework in `after` hooks.
# File lib/rspec/rails/adapters.rb, line 28 def teardown(*methods) methods.each { |method| after { send method } } end