module RSpec::Rails::SetupAndTeardownAdapter::ClassMethods
Public Instance Methods
Source
# File lib/rspec/rails/adapters.rb, line 108 def setup(*methods, &block) methods.each do |method| if method.to_s =~ /^setup_(with_controller|fixtures|controller_request_and_response)$/ prepend_before { __send__ method } else before { __send__ method } end end before(&block) if block end
Wraps ‘setup` calls from within Rails’ testing framework in ‘before` hooks.
Source
# File lib/rspec/rails/adapters.rb, line 123 def teardown(*methods, &block) methods.each { |method| after { __send__ method } } after(&block) if block end
@api private
Wraps ‘teardown` calls from within Rails’ testing framework in ‘after` hooks.