Module: Test::Unit::Fixture::ClassMethods
- Defined in:
- lib/test/unit/fixture.rb
Instance Method Summary collapse
- #cleanup(*method_names, &callback) ⇒ Object
- #fixture ⇒ Object
- #setup(*method_names, &callback) ⇒ Object
- #teardown(*method_names, &callback) ⇒ Object
- #unregister_cleanup(*method_names_or_callbacks) ⇒ Object
- #unregister_setup(*method_names_or_callbacks) ⇒ Object
- #unregister_teardown(*method_names_or_callbacks) ⇒ Object
Instance Method Details
#cleanup(*method_names, &callback) ⇒ Object
148 149 150 |
# File 'lib/test/unit/fixture.rb', line 148 def cleanup(*method_names, &callback) register_fixture(:cleanup, *method_names, &callback) end |
#fixture ⇒ Object
136 137 138 |
# File 'lib/test/unit/fixture.rb', line 136 def fixture @fixture ||= Fixture.new(self) end |
#setup(*method_names, &callback) ⇒ Object
140 141 142 |
# File 'lib/test/unit/fixture.rb', line 140 def setup(*method_names, &callback) register_fixture(:setup, *method_names, &callback) end |
#teardown(*method_names, &callback) ⇒ Object
156 157 158 |
# File 'lib/test/unit/fixture.rb', line 156 def teardown(*method_names, &callback) register_fixture(:teardown, *method_names, &callback) end |
#unregister_cleanup(*method_names_or_callbacks) ⇒ Object
152 153 154 |
# File 'lib/test/unit/fixture.rb', line 152 def unregister_cleanup(*method_names_or_callbacks) unregister_fixture(:cleanup, *method_names_or_callbacks) end |
#unregister_setup(*method_names_or_callbacks) ⇒ Object
144 145 146 |
# File 'lib/test/unit/fixture.rb', line 144 def unregister_setup(*method_names_or_callbacks) unregister_fixture(:setup, *method_names_or_callbacks) end |
#unregister_teardown(*method_names_or_callbacks) ⇒ Object
160 161 162 |
# File 'lib/test/unit/fixture.rb', line 160 def unregister_teardown(*method_names_or_callbacks) unregister_fixture(:teardown, *method_names_or_callbacks) end |