Sha256: 54b6d15551808fcccb1cbb95ea5095af918742bbf2f94831df239ada106bf95e
Contents?: true
Size: 784 Bytes
Versions: 15
Compression:
Stored size: 784 Bytes
Contents
require 'yaml' require 'cucumber/cucumber_expressions/cucumber_expression_parser' require 'cucumber/cucumber_expressions/errors' module Cucumber module CucumberExpressions describe CucumberExpressionParser do Dir['../testdata/cucumber-expression/parser/*.yaml'].each do |path| expectation = YAML.load_file(path) it "parses #{path}" do parser = CucumberExpressionParser.new if expectation['exception'] expect { parser.parse(expectation['expression']) }.to raise_error(expectation['exception']) else node = parser.parse(expectation['expression']) node_hash = node.to_hash expect(node_hash).to eq(expectation['expected_ast']) end end end end end end
Version data entries
15 entries across 15 versions & 3 rubygems