Class: Filet::TestCase

Inherits:
Object
  • Object
show all
Extended by:
Backport::Declarative, Hooks
Defined in:
lib/filet/test_case.rb

Class Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Methods included from Hooks

context_hook, context_hook=, extended, feature_hook, feature_hook=

Methods included from Backport::Declarative

test

Class Attribute Details

.descriptionObject

Returns the value of attribute description.



15
16
17
# File 'lib/filet/test_case.rb', line 15

def description
  @description
end

Class Method Details

.background(&block) ⇒ Object



27
28
29
# File 'lib/filet/test_case.rb', line 27

def background(&block)
  define_method(:setup, &block)
end

.context(name, options = {}, &block) ⇒ Object



19
20
21
22
23
24
25
# File 'lib/filet/test_case.rb', line 19

def context(name, options = {}, &block)
  klass = create_class(name, self, &block)

  context_hook.call(klass, options) if context_hook

  klass
end

.teardown(&block) ⇒ Object



31
32
33
# File 'lib/filet/test_case.rb', line 31

def teardown(&block)
  define_method(:teardown, &block)
end

Instance Method Details

#default_testObject

Placeholder so test/unit ignores test cases without any tests.



38
39
# File 'lib/filet/test_case.rb', line 38

def default_test
end