aslakhellesoy-cucumber 0.1.99.17 → 0.1.99.18

Sign up to get free protection for your applications and to get access to all the features.
data/History.txt CHANGED
@@ -57,9 +57,24 @@ Scenario Outlines, the rich command line, the nice output format and everything
57
57
  pure Ruby users have been enjoying for a while.
58
58
 
59
59
  == TODO Before 0.2 release
60
+ * Make sure all features and specs pass on Windows, JRuby and Ruby 1.9
60
61
  * Verify that custom formatters work - write a feature for it
61
62
  * Implement at least a basic HTML formatter
62
63
  * Run a single cucumber feature from rake "rake features FEATURE=/path/to/feature:line"
64
+ * Wiki page about running subsets
65
+ ** file:line
66
+ *** scenario (or step within)
67
+ *** scenario outline
68
+ *** scenario outline examples
69
+ *** line in an example table
70
+ *** background (same as whole file)
71
+ *** fix bugs in any of those cases (there are some)
72
+ ** --tags
73
+ *** Link to page about tags
74
+ * Tags with arguments
75
+ * cucumber.jar + examples
76
+ ** Remove need for -S cucumber
77
+ ** Full jar and simple jar
63
78
 
64
79
  == Bugfixes
65
80
  * -n option does not suppress the line info for a Scenario Outline (#175 Aslak Hellesøy)
@@ -94,7 +109,7 @@ pure Ruby users have been enjoying for a while.
94
109
  * Run cucumber --language LANG help to see keywords for a given language. (Aslak Hellesøy)
95
110
  * Multiline arguments (tables and """ strings) are printed in the output. (Aslak Hellesøy)
96
111
  * It's no longer necessary to compile the Treetop grammar when adding a new language. Localised parser is generated at runtime. (Aslak Hellesøy)
97
- * New --guess option tries to guess the best step definition match instead of raising Cucumber::Multiple. (Jake Howerton)
112
+ * New --guess option tries to guess the best step definition match instead of raising Cucumber::Multiple. (Jake Howerton)
98
113
 
99
114
  === Removed features
100
115
  * "GivenScenario" is gone. Instead you can call Steps from Steps, or wait for "Background (#153)"
data/Manifest.txt CHANGED
@@ -138,8 +138,9 @@ examples/test_unit/features/test_unit.feature
138
138
  examples/tickets/Rakefile
139
139
  examples/tickets/cucumber.yml
140
140
  examples/tickets/features/172.feature
141
- examples/tickets/features/177-1.feature
142
- examples/tickets/features/177-2.feature
141
+ examples/tickets/features/177/1.feature
142
+ examples/tickets/features/177/2.feature
143
+ examples/tickets/features/177/3.feature
143
144
  examples/tickets/features/180.feature
144
145
  examples/tickets/features/lib/eatting_machine.rb
145
146
  examples/tickets/features/lib/pantry.rb
@@ -3,7 +3,7 @@ h1. Internationalisation (i18n) examples
3
3
  Under this directory you'll find examples of Cucumber features written in
4
4
  many of the natural languages Cucumber supports.
5
5
 
6
- For a full list of what languages Cucumber supports - run <pre>cucumber --help</pre>
6
+ For a full list of what languages Cucumber supports - run <pre>cucumber --language help</pre>
7
7
 
8
8
  h2. Running all the examples
9
9
 
@@ -0,0 +1,18 @@
1
+ Matt's example with a comment before a step
2
+
3
+ Scenario: Upload an image for an artist and create a concert in the process
4
+ Given I am logged in to my account
5
+ And there is one Artist named "Pixies"
6
+ And there is one Venue
7
+ When I visit the page for the Artist
8
+ And I follow "add a photo"
9
+ And I upload an Image
10
+ # Search on select concert page
11
+ And I press "Search Pixies concerts"
12
+ And I follow "Add a new Concert"
13
+ And I fill in new Concert information
14
+ And I press "Preview"
15
+ And I press "Add concert"
16
+ # No artists appear in this photo
17
+ And I press "Submit"
18
+ Then my Concert should exist with 1 Image
@@ -4,7 +4,9 @@ module Cucumber
4
4
  module Cli
5
5
  class LanguageHelpFormatter < Formatter::Pretty
6
6
  INCOMPLETE = %{
7
- This language is incomplete. Please translate the missing words in
7
+ The Cucumber grammar has evolved since this translation was written.
8
+ Please help us complete the translation by translating the missing words in
9
+
8
10
  #{Cucumber::LANGUAGE_FILE}
9
11
 
10
12
  Then contribute back to the Cucumber project. Details here:
@@ -20,12 +22,11 @@ http://wiki.github.com/aslakhellesoy/cucumber/spoken-languages
20
22
  end
21
23
 
22
24
  def self.list_keywords(io, lang)
23
- Cucumber.load_language(lang)
24
25
  raw = Cucumber::KEYWORD_KEYS.map do |key|
25
26
  [key, Cucumber::LANGUAGES[lang][key]]
26
27
  end
27
28
  table = Ast::Table.new(raw)
28
- new(nil, io, {:incomplete => Cucumber.language_incomplete?}, '').visit_multiline_arg(table, :passed)
29
+ new(nil, io, {:incomplete => Cucumber.language_incomplete?(lang)}, '').visit_multiline_arg(table, :passed)
29
30
  end
30
31
 
31
32
  def visit_multiline_arg(table, status)
@@ -879,20 +879,24 @@ module Cucumber
879
879
  end
880
880
 
881
881
  module Step0
882
+ def comment
883
+ elements[0]
884
+ end
885
+
882
886
  def step_keyword
883
- elements[1]
887
+ elements[2]
884
888
  end
885
889
 
886
890
  def name
887
- elements[3]
891
+ elements[4]
888
892
  end
889
893
 
890
894
  def multi
891
- elements[5]
895
+ elements[6]
892
896
  end
893
897
 
894
898
  def white
895
- elements[6]
899
+ elements[7]
896
900
  end
897
901
  end
898
902
 
@@ -915,75 +919,79 @@ module Cucumber
915
919
  end
916
920
 
917
921
  i0, s0 = index, []
918
- s1, i1 = [], index
919
- loop do
920
- r2 = _nt_space
921
- if r2
922
- s1 << r2
923
- else
924
- break
925
- end
926
- end
927
- r1 = SyntaxNode.new(input, i1...index, s1)
922
+ r1 = _nt_comment
928
923
  s0 << r1
929
924
  if r1
930
- r3 = _nt_step_keyword
931
- s0 << r3
932
- if r3
933
- s4, i4 = [], index
934
- loop do
935
- r5 = _nt_space
936
- if r5
937
- s4 << r5
938
- else
939
- break
940
- end
925
+ s2, i2 = [], index
926
+ loop do
927
+ r3 = _nt_space
928
+ if r3
929
+ s2 << r3
930
+ else
931
+ break
941
932
  end
942
- r4 = SyntaxNode.new(input, i4...index, s4)
933
+ end
934
+ r2 = SyntaxNode.new(input, i2...index, s2)
935
+ s0 << r2
936
+ if r2
937
+ r4 = _nt_step_keyword
943
938
  s0 << r4
944
939
  if r4
945
- r6 = _nt_line_to_eol
946
- s0 << r6
947
- if r6
948
- i7 = index
949
- s8, i8 = [], index
950
- loop do
951
- r9 = _nt_eol
952
- if r9
953
- s8 << r9
954
- else
955
- break
956
- end
957
- end
958
- if s8.empty?
959
- self.index = i8
960
- r8 = nil
961
- else
962
- r8 = SyntaxNode.new(input, i8...index, s8)
963
- end
964
- if r8
965
- r7 = r8
940
+ s5, i5 = [], index
941
+ loop do
942
+ r6 = _nt_space
943
+ if r6
944
+ s5 << r6
966
945
  else
967
- r10 = _nt_eof
968
- if r10
969
- r7 = r10
970
- else
971
- self.index = i7
972
- r7 = nil
973
- end
946
+ break
974
947
  end
948
+ end
949
+ r5 = SyntaxNode.new(input, i5...index, s5)
950
+ s0 << r5
951
+ if r5
952
+ r7 = _nt_line_to_eol
975
953
  s0 << r7
976
954
  if r7
977
- r12 = _nt_multiline_arg
978
- if r12
979
- r11 = r12
955
+ i8 = index
956
+ s9, i9 = [], index
957
+ loop do
958
+ r10 = _nt_eol
959
+ if r10
960
+ s9 << r10
961
+ else
962
+ break
963
+ end
964
+ end
965
+ if s9.empty?
966
+ self.index = i9
967
+ r9 = nil
968
+ else
969
+ r9 = SyntaxNode.new(input, i9...index, s9)
970
+ end
971
+ if r9
972
+ r8 = r9
980
973
  else
981
- r11 = SyntaxNode.new(input, index...index)
974
+ r11 = _nt_eof
975
+ if r11
976
+ r8 = r11
977
+ else
978
+ self.index = i8
979
+ r8 = nil
980
+ end
982
981
  end
983
- s0 << r11
984
- if r11
985
- r13 = _nt_white
986
- s0 << r13
982
+ s0 << r8
983
+ if r8
984
+ r13 = _nt_multiline_arg
985
+ if r13
986
+ r12 = r13
987
+ else
988
+ r12 = SyntaxNode.new(input, index...index)
989
+ end
990
+ s0 << r12
991
+ if r12
992
+ r14 = _nt_white
993
+ s0 << r14
994
+ end
987
995
  end
988
996
  end
989
997
  end
@@ -116,7 +116,7 @@ module Cucumber
116
116
  end
117
117
 
118
118
  rule step
119
- space* step_keyword space* name:line_to_eol (eol+ / eof) multi:multiline_arg? white {
119
+ comment space* step_keyword space* name:line_to_eol (eol+ / eof) multi:multiline_arg? white {
120
120
  def build
121
121
  if multi.respond_to?(:build)
122
122
  Ast::Step.new(step_keyword.line, step_keyword.text_value, name.text_value, multi.build)
@@ -3,7 +3,7 @@ module Cucumber #:nodoc:
3
3
  MAJOR = 0
4
4
  MINOR = 1
5
5
  TINY = 99
6
- PATCH = 17 # Set to nil for official release
6
+ PATCH = 18 # Set to nil for official release
7
7
 
8
8
  STRING = [MAJOR, MINOR, TINY, PATCH].compact.join('.')
9
9
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: aslakhellesoy-cucumber
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.99.17
4
+ version: 0.1.99.18
5
5
  platform: ruby
6
6
  authors:
7
7
  - "Aslak Helles\xC3\xB8y"
@@ -202,8 +202,9 @@ files:
202
202
  - examples/tickets/Rakefile
203
203
  - examples/tickets/cucumber.yml
204
204
  - examples/tickets/features/172.feature
205
- - examples/tickets/features/177-1.feature
206
- - examples/tickets/features/177-2.feature
205
+ - examples/tickets/features/177/1.feature
206
+ - examples/tickets/features/177/2.feature
207
+ - examples/tickets/features/177/3.feature
207
208
  - examples/tickets/features/180.feature
208
209
  - examples/tickets/features/lib/eatting_machine.rb
209
210
  - examples/tickets/features/lib/pantry.rb