Module: ActiveSupport::Testing::SetupAndTeardown
Relationships & Source Files | |
Namespace Children | |
Modules:
| |
Extension / Inclusion / Inheritance Descendants | |
Included In:
| |
Super Chains via Extension / Inclusion / Inheritance | |
Class Chain:
self,
::ActiveSupport::Concern
|
|
Defined in: | activesupport/lib/active_support/testing/setup_and_teardown.rb |
Overview
Adds support for setup
and teardown
callbacks. These callbacks serve as a replacement to overwriting the #setup
and #teardown
methods of your ::ActiveSupport::TestCase.
class ExampleTest < ActiveSupport::TestCase
setup do
# ...
end
teardown do
# ...
end
end
Class Method Summary
::ActiveSupport::Concern - Extended
DSL Calls
included
[ GitHub ]22 23 24 25
# File 'activesupport/lib/active_support/testing/setup_and_teardown.rb', line 22
included do include ActiveSupport::Callbacks define_callbacks :setup, :teardown end