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

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

Instance Method Summary collapse

Instance Method Details

#cleanup(*method_names, &callback) ⇒ Object



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

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

#fixtureObject



197
198
199
# File 'lib/test/unit/fixture.rb', line 197

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

#setup(*method_names, &callback) ⇒ Object



201
202
203
# File 'lib/test/unit/fixture.rb', line 201

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

#teardown(*method_names, &callback) ⇒ Object



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

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

#unregister_cleanup(*method_names_or_callbacks) ⇒ Object



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

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

#unregister_setup(*method_names_or_callbacks) ⇒ Object



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

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

#unregister_teardown(*method_names_or_callbacks) ⇒ Object



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

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