Module: ActiveSupport::Testing::SetupAndTeardown::ClassMethods
Relationships & Source Files | |
Defined in: | activesupport/lib/active_support/testing/setup_and_teardown.rb |
Instance Method Summary
-
#setup(*args, &block)
Add a callback, which runs before
TestCase#setup
. -
#teardown(*args, &block)
Add a callback, which runs after
TestCase#teardown
.
Instance Method Details
#setup(*args, &block)
Add a callback, which runs before TestCase#setup
.
# File 'activesupport/lib/active_support/testing/setup_and_teardown.rb', line 29
def setup(*args, &block) set_callback(:setup, :before, *args, &block) end
#teardown(*args, &block)
Add a callback, which runs after TestCase#teardown
.
# File 'activesupport/lib/active_support/testing/setup_and_teardown.rb', line 34
def teardown(*args, &block) set_callback(:teardown, :after, *args, &block) end