Module: RSpec::Rails::SetupAndTeardownAdapter::ClassMethods

Defined in:
lib/rspec/rails/adapters.rb

Instance Method Summary collapse

Instance Method Details

#setup(*methods) ⇒ Object

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

Wraps ‘setup` calls from within Rails’ testing framework in ‘before` hooks.



14
15
16
# File 'lib/rspec/rails/adapters.rb', line 14

def setup(*methods)
  methods.each {|method| before { send method } }
end

#teardown(*methods) ⇒ Object

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

Wraps ‘teardown` calls from within Rails’ testing framework in ‘after` hooks.



22
23
24
# File 'lib/rspec/rails/adapters.rb', line 22

def teardown(*methods)
  methods.each {|method| after { send method } }
end