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

Version Path
honeybadger-5.3.0 vendor/bundle/ruby/3.2.0/gems/cucumber-cucumber-expressions-16.1.2/spec/cucumber/cucumber_expressions/cucumber_expression_parser_spec.rb
rubypitaya-3.12.5 ./lib/rubypitaya/app-template/vendor/bundle/ruby/3.1.0/gems/cucumber-cucumber-expressions-15.2.0/spec/cucumber/cucumber_expressions/cucumber_expression_parser_spec.rb
rubypitaya-3.12.4 ./lib/rubypitaya/app-template/vendor/bundle/ruby/3.1.0/gems/cucumber-cucumber-expressions-15.2.0/spec/cucumber/cucumber_expressions/cucumber_expression_parser_spec.rb
rubypitaya-3.12.3 ./lib/rubypitaya/app-template/vendor/bundle/ruby/3.1.0/gems/cucumber-cucumber-expressions-15.2.0/spec/cucumber/cucumber_expressions/cucumber_expression_parser_spec.rb
cucumber-cucumber-expressions-16.1.2 spec/cucumber/cucumber_expressions/cucumber_expression_parser_spec.rb
rubypitaya-3.12.2 ./lib/rubypitaya/app-template/vendor/bundle/ruby/3.1.0/gems/cucumber-cucumber-expressions-15.2.0/spec/cucumber/cucumber_expressions/cucumber_expression_parser_spec.rb
cucumber-cucumber-expressions-16.1.1 spec/cucumber/cucumber_expressions/cucumber_expression_parser_spec.rb
cucumber-cucumber-expressions-16.1.0 spec/cucumber/cucumber_expressions/cucumber_expression_parser_spec.rb
cucumber-cucumber-expressions-16.0.1 spec/cucumber/cucumber_expressions/cucumber_expression_parser_spec.rb
cucumber-cucumber-expressions-16.0.0 spec/cucumber/cucumber_expressions/cucumber_expression_parser_spec.rb
cucumber-cucumber-expressions-15.2.0 spec/cucumber/cucumber_expressions/cucumber_expression_parser_spec.rb
cucumber-cucumber-expressions-15.1.1 spec/cucumber/cucumber_expressions/cucumber_expression_parser_spec.rb
cucumber-cucumber-expressions-15.1.0 spec/cucumber/cucumber_expressions/cucumber_expression_parser_spec.rb
cucumber-cucumber-expressions-15.0.2 spec/cucumber/cucumber_expressions/cucumber_expression_parser_spec.rb
cucumber-cucumber-expressions-15.0.1 spec/cucumber/cucumber_expressions/cucumber_expression_parser_spec.rb