Module: Pione::TestHelper::Transformer

Defined in:
lib/pione/test-helper/transformer-helper.rb

Defined Under Namespace

Classes: FailCase, Spec, SucceedCase, TestCase, TestCases

Class Method Summary collapse

Class Method Details

.spec(name, parser_name, option = {}, context, &b) ⇒ Object

Define transformer specification.



125
126
127
128
129
130
131
132
# File 'lib/pione/test-helper/transformer-helper.rb', line 125

def spec(name, parser_name, option={}, context, &b)
  testcases = TestCases.new.tap {|x| x.instance_eval(&b)}

  # setup bacon context
  context.describe(name) do
    Spec.new(testcases, name, parser_name, option, context).declare
  end
end