gherkin 2.1.3-i386-mingw32 → 2.1.4-i386-mingw32
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- 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 +5 -3
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
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: gherkin
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 3
|
5
5
|
prerelease: false
|
6
6
|
segments:
|
7
7
|
- 2
|
8
8
|
- 1
|
9
|
-
-
|
10
|
-
version: 2.1.
|
9
|
+
- 4
|
10
|
+
version: 2.1.4
|
11
11
|
platform: i386-mingw32
|
12
12
|
authors:
|
13
13
|
- Mike Sassak
|
@@ -288,6 +288,7 @@ files:
|
|
288
288
|
- spec/gherkin/java_lexer_spec.rb
|
289
289
|
- spec/gherkin/json_parser_spec.rb
|
290
290
|
- spec/gherkin/output_stream_string_io.rb
|
291
|
+
- spec/gherkin/parser/parser_spec.rb
|
291
292
|
- spec/gherkin/rb_lexer_spec.rb
|
292
293
|
- spec/gherkin/sexp_recorder.rb
|
293
294
|
- spec/gherkin/shared/lexer_group.rb
|
@@ -355,6 +356,7 @@ test_files:
|
|
355
356
|
- spec/gherkin/java_lexer_spec.rb
|
356
357
|
- spec/gherkin/json_parser_spec.rb
|
357
358
|
- spec/gherkin/output_stream_string_io.rb
|
359
|
+
- spec/gherkin/parser/parser_spec.rb
|
358
360
|
- spec/gherkin/rb_lexer_spec.rb
|
359
361
|
- spec/gherkin/sexp_recorder.rb
|
360
362
|
- spec/gherkin/shared/lexer_group.rb
|