Class: Filet::TestCase

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

Class Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Methods included from Backport::Declarative

test

Class Attribute Details

.descriptionObject

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, options = {}, &block)
  klass = create_class(name, self, &block)

  Filet.context_hook.call(klass, options) 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_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