# File lib/test/unit/fixture.rb, line 209 def cleanup(*method_names, &callback) register_fixture(:cleanup, *method_names, &callback) end
# File lib/test/unit/fixture.rb, line 197 def fixture @fixture ||= Fixture.new(self) end
# File lib/test/unit/fixture.rb, line 201 def setup(*method_names, &callback) register_fixture(:setup, *method_names, &callback) end
# File lib/test/unit/fixture.rb, line 217 def teardown(*method_names, &callback) register_fixture(:teardown, *method_names, &callback) end
# File lib/test/unit/fixture.rb, line 213 def unregister_cleanup(*method_names_or_callbacks) unregister_fixture(:cleanup, *method_names_or_callbacks) end
# File lib/test/unit/fixture.rb, line 205 def unregister_setup(*method_names_or_callbacks) unregister_fixture(:setup, *method_names_or_callbacks) end
# File lib/test/unit/fixture.rb, line 221 def unregister_teardown(*method_names_or_callbacks) unregister_fixture(:teardown, *method_names_or_callbacks) end
# File lib/test/unit/fixture.rb, line 226 def register_fixture(fixture, *method_names, &callback) options = {} options = method_names.pop if method_names.last.is_a?(Hash) callbacks = method_names callbacks << callback if callback attribute(fixture, options, *callbacks) end
# File lib/test/unit/fixture.rb, line 234 def unregister_fixture(fixture, *method_names_or_callbacks) attribute(fixture, nil, *method_names_or_callbacks) end