Module: ActiveSupport::Testing::SetupAndTeardown::ClassMethods
- Defined in:
- lib/active_support/testing/setup_and_teardown.rb
Instance Method Summary collapse
-
#setup(*args, &block) ⇒ Object
Add a callback, which runs before
TestCase#setup
. -
#teardown(*args, &block) ⇒ Object
Add a callback, which runs after
TestCase#teardown
.
Instance Method Details
#setup(*args, &block) ⇒ Object
Add a callback, which runs before TestCase#setup
.
31 32 33 |
# File 'lib/active_support/testing/setup_and_teardown.rb', line 31 def setup(*args, &block) set_callback(:setup, :before, *args, &block) end |
#teardown(*args, &block) ⇒ Object
Add a callback, which runs after TestCase#teardown
.
36 37 38 |
# File 'lib/active_support/testing/setup_and_teardown.rb', line 36 def teardown(*args, &block) set_callback(:teardown, :after, *args, &block) end |