gherkin 2.5.4-x86-mswin32 → 2.6.0-x86-mswin32

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.
Files changed (112) hide show
  1. data/Gemfile +2 -0
  2. data/Gemfile.lock +9 -7
  3. data/History.md +11 -1
  4. data/README.md +1 -1
  5. data/features/json_formatter.feature +376 -310
  6. data/features/json_parser.feature +245 -228
  7. data/features/step_definitions/json_formatter_steps.rb +7 -4
  8. data/features/step_definitions/json_parser_steps.rb +1 -1
  9. data/features/step_definitions/pretty_formatter_steps.rb +2 -1
  10. data/gherkin.gemspec +4 -3
  11. data/lib/1.8/gherkin_lexer_ar.so +0 -0
  12. data/lib/1.8/gherkin_lexer_bg.so +0 -0
  13. data/lib/1.8/gherkin_lexer_ca.so +0 -0
  14. data/lib/1.8/gherkin_lexer_cs.so +0 -0
  15. data/lib/1.8/gherkin_lexer_cy_gb.so +0 -0
  16. data/lib/1.8/gherkin_lexer_da.so +0 -0
  17. data/lib/1.8/gherkin_lexer_de.so +0 -0
  18. data/lib/1.8/gherkin_lexer_en.so +0 -0
  19. data/lib/1.8/gherkin_lexer_en_au.so +0 -0
  20. data/lib/1.8/gherkin_lexer_en_lol.so +0 -0
  21. data/lib/1.8/gherkin_lexer_en_pirate.so +0 -0
  22. data/lib/1.8/gherkin_lexer_en_scouse.so +0 -0
  23. data/lib/1.8/gherkin_lexer_en_tx.so +0 -0
  24. data/lib/1.8/gherkin_lexer_eo.so +0 -0
  25. data/lib/1.8/gherkin_lexer_es.so +0 -0
  26. data/lib/1.8/gherkin_lexer_et.so +0 -0
  27. data/lib/1.8/gherkin_lexer_fi.so +0 -0
  28. data/lib/1.8/gherkin_lexer_fr.so +0 -0
  29. data/lib/1.8/gherkin_lexer_he.so +0 -0
  30. data/lib/1.8/gherkin_lexer_hr.so +0 -0
  31. data/lib/1.8/gherkin_lexer_hu.so +0 -0
  32. data/lib/1.8/gherkin_lexer_id.so +0 -0
  33. data/lib/1.8/gherkin_lexer_is.so +0 -0
  34. data/lib/1.8/gherkin_lexer_it.so +0 -0
  35. data/lib/1.8/gherkin_lexer_ja.so +0 -0
  36. data/lib/1.8/gherkin_lexer_ko.so +0 -0
  37. data/lib/1.8/gherkin_lexer_lt.so +0 -0
  38. data/lib/1.8/gherkin_lexer_lu.so +0 -0
  39. data/lib/1.8/gherkin_lexer_lv.so +0 -0
  40. data/lib/1.8/gherkin_lexer_nl.so +0 -0
  41. data/lib/1.8/gherkin_lexer_no.so +0 -0
  42. data/lib/1.8/gherkin_lexer_pl.so +0 -0
  43. data/lib/1.8/gherkin_lexer_pt.so +0 -0
  44. data/lib/1.8/gherkin_lexer_ro.so +0 -0
  45. data/lib/1.8/gherkin_lexer_ru.so +0 -0
  46. data/lib/1.8/gherkin_lexer_sk.so +0 -0
  47. data/lib/1.8/gherkin_lexer_sr_cyrl.so +0 -0
  48. data/lib/1.8/gherkin_lexer_sr_latn.so +0 -0
  49. data/lib/1.8/gherkin_lexer_sv.so +0 -0
  50. data/lib/1.8/gherkin_lexer_tr.so +0 -0
  51. data/lib/1.8/gherkin_lexer_uk.so +0 -0
  52. data/lib/1.8/gherkin_lexer_uz.so +0 -0
  53. data/lib/1.8/gherkin_lexer_vi.so +0 -0
  54. data/lib/1.8/gherkin_lexer_zh_cn.so +0 -0
  55. data/lib/1.8/gherkin_lexer_zh_tw.so +0 -0
  56. data/lib/1.9/gherkin_lexer_ar.so +0 -0
  57. data/lib/1.9/gherkin_lexer_bg.so +0 -0
  58. data/lib/1.9/gherkin_lexer_ca.so +0 -0
  59. data/lib/1.9/gherkin_lexer_cs.so +0 -0
  60. data/lib/1.9/gherkin_lexer_cy_gb.so +0 -0
  61. data/lib/1.9/gherkin_lexer_da.so +0 -0
  62. data/lib/1.9/gherkin_lexer_de.so +0 -0
  63. data/lib/1.9/gherkin_lexer_en.so +0 -0
  64. data/lib/1.9/gherkin_lexer_en_au.so +0 -0
  65. data/lib/1.9/gherkin_lexer_en_lol.so +0 -0
  66. data/lib/1.9/gherkin_lexer_en_pirate.so +0 -0
  67. data/lib/1.9/gherkin_lexer_en_scouse.so +0 -0
  68. data/lib/1.9/gherkin_lexer_en_tx.so +0 -0
  69. data/lib/1.9/gherkin_lexer_eo.so +0 -0
  70. data/lib/1.9/gherkin_lexer_es.so +0 -0
  71. data/lib/1.9/gherkin_lexer_et.so +0 -0
  72. data/lib/1.9/gherkin_lexer_fi.so +0 -0
  73. data/lib/1.9/gherkin_lexer_fr.so +0 -0
  74. data/lib/1.9/gherkin_lexer_he.so +0 -0
  75. data/lib/1.9/gherkin_lexer_hr.so +0 -0
  76. data/lib/1.9/gherkin_lexer_hu.so +0 -0
  77. data/lib/1.9/gherkin_lexer_id.so +0 -0
  78. data/lib/1.9/gherkin_lexer_is.so +0 -0
  79. data/lib/1.9/gherkin_lexer_it.so +0 -0
  80. data/lib/1.9/gherkin_lexer_ja.so +0 -0
  81. data/lib/1.9/gherkin_lexer_ko.so +0 -0
  82. data/lib/1.9/gherkin_lexer_lt.so +0 -0
  83. data/lib/1.9/gherkin_lexer_lu.so +0 -0
  84. data/lib/1.9/gherkin_lexer_lv.so +0 -0
  85. data/lib/1.9/gherkin_lexer_nl.so +0 -0
  86. data/lib/1.9/gherkin_lexer_no.so +0 -0
  87. data/lib/1.9/gherkin_lexer_pl.so +0 -0
  88. data/lib/1.9/gherkin_lexer_pt.so +0 -0
  89. data/lib/1.9/gherkin_lexer_ro.so +0 -0
  90. data/lib/1.9/gherkin_lexer_ru.so +0 -0
  91. data/lib/1.9/gherkin_lexer_sk.so +0 -0
  92. data/lib/1.9/gherkin_lexer_sr_cyrl.so +0 -0
  93. data/lib/1.9/gherkin_lexer_sr_latn.so +0 -0
  94. data/lib/1.9/gherkin_lexer_sv.so +0 -0
  95. data/lib/1.9/gherkin_lexer_tr.so +0 -0
  96. data/lib/1.9/gherkin_lexer_uk.so +0 -0
  97. data/lib/1.9/gherkin_lexer_uz.so +0 -0
  98. data/lib/1.9/gherkin_lexer_vi.so +0 -0
  99. data/lib/1.9/gherkin_lexer_zh_cn.so +0 -0
  100. data/lib/1.9/gherkin_lexer_zh_tw.so +0 -0
  101. data/lib/gherkin/formatter/json_formatter.rb +13 -9
  102. data/lib/gherkin/formatter/model.rb +78 -20
  103. data/lib/gherkin/formatter/pretty_formatter.rb +1 -1
  104. data/lib/gherkin/json_parser.rb +32 -24
  105. data/lib/gherkin/listener/formatter_listener.rb +76 -50
  106. data/spec/gherkin/fixtures/complex.json +8 -1
  107. data/spec/gherkin/formatter/json_formatter_spec.rb +49 -43
  108. data/spec/gherkin/formatter/model_spec.rb +2 -2
  109. data/spec/gherkin/formatter/pretty_formatter_spec.rb +10 -10
  110. data/spec/gherkin/json_parser_spec.rb +93 -77
  111. data/spec/gherkin/sexp_recorder.rb +0 -3
  112. metadata +25 -25
@@ -177,7 +177,7 @@ module Gherkin
177
177
 
178
178
  private
179
179
 
180
- def doc_string(doc_string)
180
+ def doc_string(doc_string)
181
181
  @io.puts " \"\"\"" + doc_string.content_type + "\n" + escape_triple_quotes(indent(doc_string.value, ' ')) + "\n \"\"\""
182
182
  end
183
183
 
@@ -16,21 +16,23 @@ module Gherkin
16
16
 
17
17
  # Parse a gherkin object +o+, which can either be a JSON String,
18
18
  # or a Hash (from a parsed JSON String).
19
- def parse(o, feature_uri='unknown.json', line_offset=0)
19
+ def parse(o)
20
20
  o = JSON.parse(o) if String === o
21
- @formatter.uri(feature_uri)
22
-
23
- Formatter::Model::Feature.new(comments(o), tags(o), keyword(o), name(o), description(o), line(o)).replay(@formatter)
24
- (o["elements"] || []).each do |feature_element|
25
- feature_element(feature_element).replay(@formatter)
26
- (feature_element["steps"] || []).each do |step|
27
- step(step).replay(@formatter)
28
- match(step)
29
- result(step)
30
- embeddings(step)
31
- end
32
- (feature_element["examples"] || []).each do |eo|
33
- Formatter::Model::Examples.new(comments(eo), tags(eo), keyword(eo), name(eo), description(eo), line(eo), rows(eo['rows'])).replay(@formatter)
21
+
22
+ o.each do |f|
23
+ @formatter.uri(f['uri'])
24
+ Formatter::Model::Feature.new(comments(f), tags(f), keyword(f), name(f), description(f), line(f), id(f)).replay(@formatter)
25
+ (f["elements"] || []).each do |feature_element|
26
+ feature_element(feature_element).replay(@formatter)
27
+ (feature_element["steps"] || []).each do |step|
28
+ step(step).replay(@formatter)
29
+ match(step)
30
+ result(step)
31
+ embeddings(step)
32
+ end
33
+ (feature_element["examples"] || []).each do |eo|
34
+ Formatter::Model::Examples.new(comments(eo), tags(eo), keyword(eo), name(eo), description(eo), line(eo), id(eo), examples_rows(eo['rows'])).replay(@formatter)
35
+ end
34
36
  end
35
37
  end
36
38
 
@@ -44,23 +46,25 @@ module Gherkin
44
46
  when 'background'
45
47
  Formatter::Model::Background.new(comments(o), keyword(o), name(o), description(o), line(o))
46
48
  when 'scenario'
47
- Formatter::Model::Scenario.new(comments(o), tags(o), keyword(o), name(o), description(o), line(o))
49
+ Formatter::Model::Scenario.new(comments(o), tags(o), keyword(o), name(o), description(o), line(o), id(o))
48
50
  when 'scenario_outline'
49
- Formatter::Model::ScenarioOutline.new(comments(o), tags(o), keyword(o), name(o), description(o), line(o))
51
+ Formatter::Model::ScenarioOutline.new(comments(o), tags(o), keyword(o), name(o), description(o), line(o), id(o))
50
52
  end
51
53
  end
52
54
 
53
55
  def step(o)
54
- step = Formatter::Model::Step.new(comments(o), keyword(o), name(o), line(o))
56
+ builder = Formatter::Model::Step::Builder.new(comments(o), keyword(o), name(o), line(o))
57
+
58
+ (o['rows'] || []).each do |row|
59
+ builder.row comments(row), row['cells'], row['line'], nil
60
+ end
55
61
 
56
- if(o['rows'])
57
- step.rows = rows(o['rows'])
58
- elsif(o['doc_string'])
62
+ if(o['doc_string'])
59
63
  ds = o['doc_string']
60
- step.doc_string = Formatter::Model::DocString.new(ds['content_type'].to_s, ds['value'], ds['line'])
64
+ builder.doc_string ds['value'], ds['content_type'].to_s, ds['line']
61
65
  end
62
66
 
63
- step
67
+ builder.build
64
68
  end
65
69
 
66
70
  def match(o)
@@ -81,8 +85,8 @@ module Gherkin
81
85
  end
82
86
  end
83
87
 
84
- def rows(o)
85
- o.map{|row| Formatter::Model::Row.new(comments(row), row['cells'], row['line'])}
88
+ def examples_rows(o)
89
+ o.map{|row| Formatter::Model::ExamplesTableRow.new(comments(row), row['cells'], row['line'], row['id'])}
86
90
  end
87
91
 
88
92
  def comments(o)
@@ -113,6 +117,10 @@ module Gherkin
113
117
  o['line']
114
118
  end
115
119
 
120
+ def id(o)
121
+ o['id']
122
+ end
123
+
116
124
  def arguments(m)
117
125
  m['arguments'].map{|a| Formatter::Argument.new(a['offset'], a['val'])}
118
126
  end
@@ -11,54 +11,65 @@ module Gherkin
11
11
 
12
12
  def initialize(formatter)
13
13
  @formatter = formatter
14
- @comments = []
15
- @tags = []
16
- @table = nil
14
+ @stash = Stash.new
17
15
  end
18
16
 
19
17
  def comment(value, line)
20
- @comments << Formatter::Model::Comment.new(value, line)
18
+ @stash.comment Formatter::Model::Comment.new(value, line)
21
19
  end
22
20
 
23
21
  def tag(name, line)
24
- @tags << Formatter::Model::Tag.new(name, line)
22
+ @stash.tag Formatter::Model::Tag.new(name, line)
25
23
  end
26
24
 
27
25
  def feature(keyword, name, description, line)
28
- @formatter.feature(Formatter::Model::Feature.new(grab_comments!, grab_tags!, keyword, name, description, line))
26
+ @stash.feature(name) do |comments, tags, id|
27
+ replay Formatter::Model::Feature.new(comments, tags, keyword, name, description, line, id)
28
+ end
29
29
  end
30
30
 
31
31
  def background(keyword, name, description, line)
32
- @formatter.background(Formatter::Model::Background.new(grab_comments!, keyword, name, description, line))
32
+ @stash.feature_element(name) do |comments, tags, id|
33
+ replay Formatter::Model::Background.new(comments, keyword, name, description, line)
34
+ end
33
35
  end
34
36
 
35
37
  def scenario(keyword, name, description, line)
36
38
  replay_step_or_examples
37
- @formatter.scenario(Formatter::Model::Scenario.new(grab_comments!, grab_tags!, keyword, name, description, line))
39
+ @stash.feature_element(name) do |comments, tags, id|
40
+ replay Formatter::Model::Scenario.new(comments, tags, keyword, name, description, line, id)
41
+ end
38
42
  end
39
43
 
40
44
  def scenario_outline(keyword, name, description, line)
41
45
  replay_step_or_examples
42
- @formatter.scenario_outline(Formatter::Model::ScenarioOutline.new(grab_comments!, grab_tags!, keyword, name, description, line))
46
+ @stash.feature_element(name) do |comments, tags, id|
47
+ replay Formatter::Model::ScenarioOutline.new(comments, tags, keyword, name, description, line, id)
48
+ end
43
49
  end
44
50
 
45
51
  def examples(keyword, name, description, line)
46
52
  replay_step_or_examples
47
- @examples_statement = Formatter::Model::Examples.new(grab_comments!, grab_tags!, keyword, name, description, line, nil)
53
+ @stash.examples(name) do |comments, tags, id|
54
+ @current_builder = Formatter::Model::Examples::Builder.new(comments, tags, keyword, name, description, line, id)
55
+ end
48
56
  end
49
57
 
50
58
  def step(keyword, name, line)
51
59
  replay_step_or_examples
52
- @step_statement = Formatter::Model::Step.new(grab_comments!, keyword, name, line)
60
+ @stash.basic_statement do |comments|
61
+ @current_builder = Formatter::Model::Step::Builder.new(comments, keyword, name, line)
62
+ end
53
63
  end
54
64
 
55
65
  def row(cells, line)
56
- @table ||= []
57
- @table << Formatter::Model::Row.new(grab_comments!, cells, line)
66
+ @stash.basic_statement do |comments, id|
67
+ @current_builder.row(comments, cells, line, id)
68
+ end
58
69
  end
59
70
 
60
- def doc_string(string, content_type, line)
61
- @doc_string = Formatter::Model::DocString.new(string, content_type, line)
71
+ def doc_string(content_type, value, line)
72
+ @current_builder.doc_string(value, content_type, line)
62
73
  end
63
74
 
64
75
  def eof
@@ -71,46 +82,61 @@ module Gherkin
71
82
  end
72
83
 
73
84
  private
85
+
86
+ def replay(element)
87
+ element.replay(@formatter)
88
+ end
89
+
90
+ class Stash
91
+ attr_reader :comments, :tags, :ids
92
+
93
+ def initialize
94
+ @comments, @tags, @ids = [], [], []
95
+ @row_index = 0
96
+ end
97
+
98
+ def comment(comment)
99
+ @comments << comment
100
+ end
101
+
102
+ def feature(name)
103
+ @feature_id = id(name)
104
+ yield @comments, @tags, @feature_id
105
+ @comments, @tags = [], []
106
+ end
74
107
 
75
- def grab_comments!
76
- comments = @comments
77
- @comments = []
78
- comments
79
- end
80
-
81
- def grab_tags!
82
- tags = @tags
83
- @tags = []
84
- tags
85
- end
86
-
87
- def grab_rows!
88
- table = @table
89
- @table = nil
90
- table
91
- end
108
+ def feature_element(name)
109
+ @feature_element_id = "#{@feature_id};#{id(name)}"
110
+ yield @comments, @tags, @feature_element_id
111
+ @comments, @tags = [], []
112
+ end
113
+
114
+ def examples(name)
115
+ @examples_id = "#{@feature_element_id};#{id(name)}"
116
+ @row_index = 0
117
+ yield @comments, @tags, @examples_id
118
+ @comments, @tags = [], []
119
+ end
120
+
121
+ def basic_statement
122
+ @row_index += 1
123
+ yield @comments, "#{@examples_id};#{@row_index}"
124
+ @comments = []
125
+ end
126
+
127
+ def tag(tag)
128
+ @tags << tag
129
+ end
92
130
 
93
- def grab_doc_string!
94
- doc_string = @doc_string
95
- @doc_string = nil
96
- doc_string
131
+ def id(name)
132
+ (name || '').gsub(/[\s_]/, '-').downcase
133
+ end
97
134
  end
98
135
 
99
136
  def replay_step_or_examples
100
- if(@step_statement)
101
- if(doc_string = grab_doc_string!)
102
- @step_statement.doc_string = doc_string
103
- elsif(rows = grab_rows!)
104
- @step_statement.rows = rows
105
- end
106
- @formatter.step(@step_statement)
107
- @step_statement = nil
108
- end
109
- if(@examples_statement)
110
- @examples_statement.rows = grab_rows!
111
- @formatter.examples(@examples_statement)
112
- @examples_statement = nil
113
- end
137
+ return unless @current_builder
138
+ replay(@current_builder)
139
+ @current_builder = nil
114
140
  end
115
141
  end
116
142
  end
@@ -1,4 +1,6 @@
1
- {
1
+ {
2
+ "id": "feature-text",
3
+ "uri": "some/nice.feature",
2
4
  "name": "Feature Text",
3
5
  "keyword": "Feature",
4
6
  "description": "In order to test multiline forms",
@@ -20,6 +22,7 @@
20
22
  ]
21
23
  },
22
24
  { "type": "scenario_outline",
25
+ "id": "feature-text/a-scenario-outline",
23
26
  "keyword": "Scenario Outline",
24
27
  "name": "An Scenario Outline",
25
28
  "description": "",
@@ -36,6 +39,7 @@
36
39
  ],
37
40
  "examples": [
38
41
  {
42
+ "id": "feature-text/a-scenario-outline/sweet-example",
39
43
  "name": "Sweet Example",
40
44
  "keyword": "Examples",
41
45
  "description": "",
@@ -52,6 +56,7 @@
52
56
  ]
53
57
  },
54
58
  { "type" : "scenario",
59
+ "id": "feature-text/reading-a-scenario",
55
60
  "keyword": "Scenario",
56
61
  "name" : "Reading a Scenario",
57
62
  "description": "",
@@ -67,6 +72,7 @@
67
72
  ]
68
73
  },
69
74
  { "type" : "scenario",
75
+ "id": "feature-text/reading-a-second-scenario",
70
76
  "keyword": "Scenario",
71
77
  "name" : "Reading a second scenario",
72
78
  "description": "With two lines of text",
@@ -111,6 +117,7 @@
111
117
  ]
112
118
  },
113
119
  { "type" : "scenario",
120
+ "id": "feature-text/hammerzeit",
114
121
  "keyword": "Scenario",
115
122
  "name" : "Hammerzeit",
116
123
  "description": "",
@@ -10,10 +10,10 @@ module Gherkin
10
10
  io = StringIO.new
11
11
  f = JSONFormatter.new(io)
12
12
  f.uri("f.feature")
13
- f.feature(Model::Feature.new([], [], "Feature", "f", "", 1))
14
- f.scenario(Model::Scenario.new([], [], "Feature", "f", "", 2))
15
- f.step(Model::Step.new([], "Given ", "g", 3))
16
- f.step(Model::Step.new([], "When ", "w", 4))
13
+ f.feature(Model::Feature.new([], [], "Feature", "ff", "", 1, "ff"))
14
+ f.scenario(Model::Scenario.new([], [], "Scenario", "ss", "", 2, "ff/ss"))
15
+ f.step(Model::Step.new([], "Given ", "g", 3, nil, nil))
16
+ f.step(Model::Step.new([], "When ", "w", 4, nil, nil))
17
17
 
18
18
  f.match(Model::Match.new([], "def.rb:33"))
19
19
  f.result(Model::Result.new(:passed, 1, nil))
@@ -22,49 +22,55 @@ module Gherkin
22
22
  f.result(Model::Result.new(:passed, 1, nil))
23
23
 
24
24
  f.eof
25
+ f.close
25
26
 
26
27
  expected = %{
27
- {
28
- "keyword": "Feature",
29
- "name": "f",
30
- "line": 1,
31
- "description": "",
32
- "elements": [
33
- {
34
- "keyword": "Feature",
35
- "name": "f",
36
- "line": 2,
37
- "description": "",
38
- "type": "scenario",
39
- "steps": [
40
- {
41
- "keyword": "Given ",
42
- "name": "g",
43
- "line": 3,
44
- "match": {
45
- "location": "def.rb:33"
28
+ [
29
+ {
30
+ "id": "ff",
31
+ "uri": "f.feature",
32
+ "keyword": "Feature",
33
+ "name": "ff",
34
+ "line": 1,
35
+ "description": "",
36
+ "elements": [
37
+ {
38
+ "id": "ff/ss",
39
+ "keyword": "Scenario",
40
+ "name": "ss",
41
+ "line": 2,
42
+ "description": "",
43
+ "type": "scenario",
44
+ "steps": [
45
+ {
46
+ "keyword": "Given ",
47
+ "name": "g",
48
+ "line": 3,
49
+ "match": {
50
+ "location": "def.rb:33"
51
+ },
52
+ "result": {
53
+ "status": "passed",
54
+ "duration": 1
55
+ }
46
56
  },
47
- "result": {
48
- "status": "passed",
49
- "duration": 1
57
+ {
58
+ "keyword": "When ",
59
+ "name": "w",
60
+ "line": 4,
61
+ "match": {
62
+ "location": "def.rb:44"
63
+ },
64
+ "result": {
65
+ "status": "passed",
66
+ "duration": 1
67
+ }
50
68
  }
51
- },
52
- {
53
- "keyword": "When ",
54
- "name": "w",
55
- "line": 4,
56
- "match": {
57
- "location": "def.rb:44"
58
- },
59
- "result": {
60
- "status": "passed",
61
- "duration": 1
62
- }
63
- }
64
- ]
65
- }
66
- ]
67
- }
69
+ ]
70
+ }
71
+ ]
72
+ }
73
+ ]
68
74
  }
69
75
 
70
76
  JSON.parse(expected).should == JSON.parse(io.string)
@@ -14,12 +14,12 @@ module Gherkin
14
14
 
15
15
  describe Step do
16
16
  it "should provide arguments for outline tokens" do
17
- step = Step.new([], 'Given ', "I have <number> cukes in <whose> belly", 10)
17
+ step = Step.new([], 'Given ', "I have <number> cukes in <whose> belly", 10, nil, nil)
18
18
  step.outline_args.map{|arg| [arg.offset, arg.val]}.should == [[7, "<number>"], [25, "<whose>"]]
19
19
  end
20
20
 
21
21
  it "should provide no arguments when there are no outline tokens" do
22
- step = Step.new([], 'Given ', "I have 33 cukes in my belly", 10)
22
+ step = Step.new([], 'Given ', "I have 33 cukes in my belly", 10, nil, nil)
23
23
  step.outline_args.to_a.should == []
24
24
  end
25
25
  end