gherkin 2.1.3-java → 2.1.4-java
Sign up to get free protection for your applications and to get access to all the features.
- data/History.txt +5 -0
- data/VERSION.yml +1 -1
- data/lib/gherkin/parser/parser.rb +1 -1
- data/spec/gherkin/parser/parser_spec.rb +14 -0
- metadata +4 -2
data/History.txt
CHANGED
data/VERSION.yml
CHANGED
@@ -7,7 +7,7 @@ module Gherkin
|
|
7
7
|
module Parser
|
8
8
|
class ParseError < StandardError
|
9
9
|
def initialize(state, new_state, expected_states, uri, line)
|
10
|
-
super("Parse error
|
10
|
+
super("Parse error at #{uri}:#{line}. Found #{new_state} when expecting one of: #{expected_states.join(', ')}. (Current state: #{state}).")
|
11
11
|
end
|
12
12
|
end
|
13
13
|
|
@@ -0,0 +1,14 @@
|
|
1
|
+
require 'spec_helper'
|
2
|
+
|
3
|
+
module Gherkin
|
4
|
+
module Parser
|
5
|
+
describe Parser do
|
6
|
+
it "should raise when feature doesn't parse" do
|
7
|
+
p = Parser.new(mock('formatter').as_null_object)
|
8
|
+
lambda do
|
9
|
+
p.parse("Feature: f\nFeature: f", __FILE__, __LINE__-1)
|
10
|
+
end.should raise_error(/Parse error at/)
|
11
|
+
end
|
12
|
+
end
|
13
|
+
end
|
14
|
+
end
|
metadata
CHANGED
@@ -5,8 +5,8 @@ version: !ruby/object:Gem::Version
|
|
5
5
|
segments:
|
6
6
|
- 2
|
7
7
|
- 1
|
8
|
-
-
|
9
|
-
version: 2.1.
|
8
|
+
- 4
|
9
|
+
version: 2.1.4
|
10
10
|
platform: java
|
11
11
|
authors:
|
12
12
|
- Mike Sassak
|
@@ -176,6 +176,7 @@ files:
|
|
176
176
|
- spec/gherkin/java_lexer_spec.rb
|
177
177
|
- spec/gherkin/json_parser_spec.rb
|
178
178
|
- spec/gherkin/output_stream_string_io.rb
|
179
|
+
- spec/gherkin/parser/parser_spec.rb
|
179
180
|
- spec/gherkin/rb_lexer_spec.rb
|
180
181
|
- spec/gherkin/sexp_recorder.rb
|
181
182
|
- spec/gherkin/shared/lexer_group.rb
|
@@ -243,6 +244,7 @@ test_files:
|
|
243
244
|
- spec/gherkin/formatter/model_spec.rb
|
244
245
|
- spec/gherkin/formatter/pretty_formatter_spec.rb
|
245
246
|
- spec/gherkin/formatter/tag_count_formatter_spec.rb
|
247
|
+
- spec/gherkin/parser/parser_spec.rb
|
246
248
|
- spec/gherkin/shared/lexer_group.rb
|
247
249
|
- spec/gherkin/shared/py_string_group.rb
|
248
250
|
- spec/gherkin/shared/row_group.rb
|