Sha256: 1e7b59fdc10e9d8d26444599b89cc420dbf47f804567d85594a83e2d474285ba
Contents?: true
Size: 815 Bytes
Versions: 3
Compression:
Stored size: 815 Bytes
Contents
# frozen_string_literal: true 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
3 entries across 3 versions & 2 rubygems