Module: RSpec::ActiveRecord::SetupAndTeardownAdapter::ClassMethods

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

Instance Method Summary collapse

Instance Method Details

#setup(*methods) ⇒ Object



7
8
9
10
11
12
13
14
15
# File 'lib/rspec/active_record/adapters.rb', line 7

def setup(*methods)
	methods.each do |m|
		if m == :setup_fixtures
			prepend_before { send m }
		else
			before         { send m }
		end
	end
end

#teardown(*methods) ⇒ Object



17
18
19
# File 'lib/rspec/active_record/adapters.rb', line 17

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