Module: Test::Spec::TestCase::InstanceMethods
- Defined in:
- lib/test/spec.rb
Instance Method Summary collapse
- #after_all ⇒ Object
- #before_all ⇒ Object
- #context(*args) ⇒ Object (also: #describe)
- #initialize(name) ⇒ Object
- #position ⇒ Object
-
#setup ⇒ Object
:nodoc:.
-
#teardown ⇒ Object
:nodoc:.
Instance Method Details
#after_all ⇒ Object
346 347 348 |
# File 'lib/test/spec.rb', line 346 def after_all call_methods_including_parents(:after_all, :reverse) end |
#before_all ⇒ Object
342 343 344 |
# File 'lib/test/spec.rb', line 342 def before_all call_methods_including_parents(:before_all) end |
#context(*args) ⇒ Object Also known as: describe
362 363 364 365 |
# File 'lib/test/spec.rb', line 362 def context(*args) raise Test::Spec::DefinitionError, "context definition is not allowed inside a specify-block" end |
#initialize(name) ⇒ Object
350 351 352 353 354 355 356 |
# File 'lib/test/spec.rb', line 350 def initialize(name) super name # Don't let the default_test clutter up the results and don't # flunk if no tests given, either. throw :invalid_test if name.to_s == "default_test" end |
#position ⇒ Object
358 359 360 |
# File 'lib/test/spec.rb', line 358 def position self.class.position end |
#setup ⇒ Object
:nodoc:
331 332 333 334 335 |
# File 'lib/test/spec.rb', line 331 def setup # :nodoc: $TEST_SPEC_TESTCASE = self super call_methods_including_parents(:setups) end |
#teardown ⇒ Object
:nodoc:
337 338 339 340 |
# File 'lib/test/spec.rb', line 337 def teardown # :nodoc: super call_methods_including_parents(:teardowns, :reverse) end |