Sha256: 191b6fa10534324e01252e7e05418fe2d00e22c40e258225d0f2c57b15b63ddd
Contents?: true
Size: 846 Bytes
Versions: 15
Compression:
Stored size: 846 Bytes
Contents
require 'yaml' require 'cucumber/cucumber_expressions/cucumber_expression_tokenizer' require 'cucumber/cucumber_expressions/errors' module Cucumber module CucumberExpressions describe CucumberExpressionTokenizer do Dir['../testdata/cucumber-expression/tokenizer/*.yaml'].each do |path| expectation = YAML.load_file(path) it "tokenizes #{path}" do tokenizer = CucumberExpressionTokenizer.new if expectation['exception'] expect { tokenizer.tokenize(expectation['expression']) }.to raise_error(expectation['exception']) else tokens = tokenizer.tokenize(expectation['expression']) token_hashes = tokens.map{|token| token.to_hash} expect(token_hashes).to eq(expectation['expected_tokens']) end end end end end end
Version data entries
15 entries across 15 versions & 3 rubygems