Module: Test::Unit::Fixture::ClassMethods

Defined in:
lib/test/unit/fixture.rb

Instance Method Summary collapse

Instance Method Details

#cleanup(*method_names, &callback) ⇒ Object



218
219
220
# File 'lib/test/unit/fixture.rb', line 218

def cleanup(*method_names, &callback)
  register_fixture(:cleanup, *method_names, &callback)
end

#fixtureObject



206
207
208
# File 'lib/test/unit/fixture.rb', line 206

def fixture
  @fixture ||= Fixture.new(self)
end

#setup(*method_names, &callback) ⇒ Object



210
211
212
# File 'lib/test/unit/fixture.rb', line 210

def setup(*method_names, &callback)
  register_fixture(:setup, *method_names, &callback)
end

#teardown(*method_names, &callback) ⇒ Object



226
227
228
# File 'lib/test/unit/fixture.rb', line 226

def teardown(*method_names, &callback)
  register_fixture(:teardown, *method_names, &callback)
end

#unregister_cleanup(*method_names_or_callbacks) ⇒ Object



222
223
224
# File 'lib/test/unit/fixture.rb', line 222

def unregister_cleanup(*method_names_or_callbacks)
  unregister_fixture(:cleanup, *method_names_or_callbacks)
end

#unregister_setup(*method_names_or_callbacks) ⇒ Object



214
215
216
# File 'lib/test/unit/fixture.rb', line 214

def unregister_setup(*method_names_or_callbacks)
  unregister_fixture(:setup, *method_names_or_callbacks)
end

#unregister_teardown(*method_names_or_callbacks) ⇒ Object



230
231
232
# File 'lib/test/unit/fixture.rb', line 230

def unregister_teardown(*method_names_or_callbacks)
  unregister_fixture(:teardown, *method_names_or_callbacks)
end