Class: Filet::TestCase
- Inherits:
-
Object
- Object
- Filet::TestCase
- Extended by:
- Backport::Declarative
- Defined in:
- lib/filet/test_case.rb
Class Attribute Summary collapse
-
.description ⇒ Object
Returns the value of attribute description.
Class Method Summary collapse
- .background(&block) ⇒ Object
- .context(name, options = {}, &block) ⇒ Object
- .teardown(&block) ⇒ Object
Instance Method Summary collapse
-
#default_test ⇒ Object
Placeholder so test/unit ignores test cases without any tests.
Methods included from Backport::Declarative
Class Attribute Details
.description ⇒ Object
Returns the value of attribute description.
9 10 11 |
# File 'lib/filet/test_case.rb', line 9 def description @description end |
Class Method Details
.background(&block) ⇒ Object
21 22 23 24 25 26 |
# File 'lib/filet/test_case.rb', line 21 def background(&block) define_method(:setup) do super() instance_eval(&block) end end |
.context(name, options = {}, &block) ⇒ Object
13 14 15 16 17 18 19 |
# File 'lib/filet/test_case.rb', line 13 def context(name, = {}, &block) klass = create_class(name, self, &block) Filet.context_hook.call(klass, ) if Filet.context_hook klass end |
.teardown(&block) ⇒ Object
28 29 30 31 32 33 |
# File 'lib/filet/test_case.rb', line 28 def teardown(&block) define_method(:teardown) do instance_eval(&block) super() end end |
Instance Method Details
#default_test ⇒ Object
Placeholder so test/unit ignores test cases without any tests.
38 39 |
# File 'lib/filet/test_case.rb', line 38 def default_test end |