Class: Pione::TestHelper::Transformer::TestCases

Inherits:
Array
  • Object
show all
Defined in:
lib/pione/test-helper/transformer-helper.rb

Overview

test case list

Instance Attribute Summary

Attributes inherited from Array

#timestamp

Instance Method Summary collapse

Instance Method Details

#fail(string, exception_type) ⇒ Object



43
44
45
# File 'lib/pione/test-helper/transformer-helper.rb', line 43

def fail(string, exception_type)
  push(FailCase.new(string, exception_type))
end

#succeed(string) ⇒ Object



39
40
41
# File 'lib/pione/test-helper/transformer-helper.rb', line 39

def succeed(string)
  push(SucceedCase.new(string))
end

#test(obj, res = nil, &b) ⇒ Object



31
32
33
34
35
36
37
# File 'lib/pione/test-helper/transformer-helper.rb', line 31

def test(obj, res=nil, &b)
  if res
    push(Naming.Eq(TestCase.new(obj, res)))
  else
    push(Naming.Block(TestCase.new(obj, b)))
  end
end