spec/spec_helper.rb in gisele-0.5.0 vs spec/spec_helper.rb in gisele-0.5.1

- old
+ new

@@ -11,32 +11,15 @@ $stdout, $stderr = stdout, stderr end module SpecHelpers - def parse(text, rule, consume = true) - grammar = Gisele::Language::Grammar - grammar.parse(text, :root => rule, :consume => consume) - end - - def ast(text, rule, consume = true) - ast = parse(text, rule, consume).to_ast - unless sexp_grammar[rule] === ast - raise "expected #{ast} to match #{rule} (#{text})" - end - ast - end - def fixtures_dir (Path.dir/:fixtures) end def fixture_files(glob) fixtures_dir.glob(glob) - end - - def sexp_grammar - Gisele::Language end def simple_ast Gisele::ast(fixtures_dir/:tasks/"simple.gis") end \ No newline at end of file