cucumber 0.8.0 → 0.8.1

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,69 @@
1
+ require File.expand_path(File.dirname(__FILE__) + '/../../spec_helper')
2
+
3
+ require 'cucumber/step_mother'
4
+ require 'cucumber/rb_support/rb_language'
5
+
6
+ module Cucumber
7
+ module RbSupport
8
+ describe RbStepDefinition do
9
+ before do
10
+ @step_mother = Cucumber::StepMother.new
11
+ @rb = @step_mother.load_programming_language('rb')
12
+ end
13
+
14
+ def unindented(s)
15
+ s.split("\n")[1..-2].join("\n").indent(-10)
16
+ end
17
+
18
+ it "should recognise numbers in name and make according regexp" do
19
+ @rb.snippet_text('Given', 'Cloud 9 yeah', nil).should == unindented(%{
20
+ Given /^Cloud (\\d+) yeah$/ do |arg1|
21
+ pending # express the regexp above with the code you wish you had
22
+ end
23
+ })
24
+ end
25
+
26
+ it "should recognise a mix of ints, strings and why not a table too" do
27
+ @rb.snippet_text('Given', 'I have 9 "awesome" cukes in 37 "boxes"', Cucumber::Ast::Table).should == unindented(%{
28
+ Given /^I have (\\d+) "([^"]*)" cukes in (\\d+) "([^"]*)"$/ do |arg1, arg2, arg3, arg4, table|
29
+ # table is a Cucumber::Ast::Table
30
+ pending # express the regexp above with the code you wish you had
31
+ end
32
+ })
33
+ end
34
+
35
+ it "should recognise quotes in name and make according regexp" do
36
+ @rb.snippet_text('Given', 'A "first" arg', nil).should == unindented(%{
37
+ Given /^A "([^"]*)" arg$/ do |arg1|
38
+ pending # express the regexp above with the code you wish you had
39
+ end
40
+ })
41
+ end
42
+
43
+ it "should recognise several quoted words in name and make according regexp and args" do
44
+ @rb.snippet_text('Given', 'A "first" and "second" arg', nil).should == unindented(%{
45
+ Given /^A "([^"]*)" and "([^"]*)" arg$/ do |arg1, arg2|
46
+ pending # express the regexp above with the code you wish you had
47
+ end
48
+ })
49
+ end
50
+
51
+ it "should not use quote group when there are no quotes" do
52
+ @rb.snippet_text('Given', 'A first arg', nil).should == unindented(%{
53
+ Given /^A first arg$/ do
54
+ pending # express the regexp above with the code you wish you had
55
+ end
56
+ })
57
+ end
58
+
59
+ it "should be helpful with tables" do
60
+ @rb.snippet_text('Given', 'A "first" arg', Cucumber::Ast::Table).should == unindented(%{
61
+ Given /^A "([^"]*)" arg$/ do |arg1, table|
62
+ # table is a Cucumber::Ast::Table
63
+ pending # express the regexp above with the code you wish you had
64
+ end
65
+ })
66
+ end
67
+ end
68
+ end
69
+ end
@@ -88,44 +88,6 @@ module Cucumber
88
88
 
89
89
  @step_mother.step_match('capture this: this').invoke(nil)
90
90
  end
91
-
92
-
93
- def unindented(s)
94
- s.split("\n")[1..-2].join("\n").indent(-10)
95
- end
96
-
97
- it "should recognise quotes in name and make according regexp" do
98
- @rb.snippet_text('Given', 'A "first" arg', nil).should == unindented(%{
99
- Given /^A "([^"]*)" arg$/ do |arg1|
100
- pending # express the regexp above with the code you wish you had
101
- end
102
- })
103
- end
104
-
105
- it "should recognise several quoted words in name and make according regexp and args" do
106
- @rb.snippet_text('Given', 'A "first" and "second" arg', nil).should == unindented(%{
107
- Given /^A "([^"]*)" and "([^"]*)" arg$/ do |arg1, arg2|
108
- pending # express the regexp above with the code you wish you had
109
- end
110
- })
111
- end
112
-
113
- it "should not use quote group when there are no quotes" do
114
- @rb.snippet_text('Given', 'A first arg', nil).should == unindented(%{
115
- Given /^A first arg$/ do
116
- pending # express the regexp above with the code you wish you had
117
- end
118
- })
119
- end
120
-
121
- it "should be helpful with tables" do
122
- @rb.snippet_text('Given', 'A "first" arg', Cucumber::Ast::Table).should == unindented(%{
123
- Given /^A "([^"]*)" arg$/ do |arg1, table|
124
- # table is a Cucumber::Ast::Table
125
- pending # express the regexp above with the code you wish you had
126
- end
127
- })
128
- end
129
91
  end
130
92
  end
131
93
  end
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: cucumber
3
3
  version: !ruby/object:Gem::Version
4
- hash: 63
4
+ hash: 61
5
5
  prerelease: false
6
6
  segments:
7
7
  - 0
8
8
  - 8
9
- - 0
10
- version: 0.8.0
9
+ - 1
10
+ version: 0.8.1
11
11
  platform: ruby
12
12
  authors:
13
13
  - "Aslak Helles\xC3\xB8y"
@@ -15,7 +15,7 @@ autorequire:
15
15
  bindir: bin
16
16
  cert_chain: []
17
17
 
18
- date: 2010-06-06 00:00:00 -04:00
18
+ date: 2010-06-15 00:00:00 +02:00
19
19
  default_executable: cucumber
20
20
  dependencies:
21
21
  - !ruby/object:Gem::Dependency
@@ -24,14 +24,14 @@ dependencies:
24
24
  requirement: &id001 !ruby/object:Gem::Requirement
25
25
  none: false
26
26
  requirements:
27
- - - ">="
27
+ - - ~>
28
28
  - !ruby/object:Gem::Version
29
- hash: 43
29
+ hash: 15
30
30
  segments:
31
- - 1
31
+ - 2
32
+ - 0
32
33
  - 0
33
- - 30
34
- version: 1.0.30
34
+ version: 2.0.0
35
35
  type: :runtime
36
36
  version_requirements: *id001
37
37
  - !ruby/object:Gem::Dependency
@@ -40,7 +40,7 @@ dependencies:
40
40
  requirement: &id002 !ruby/object:Gem::Requirement
41
41
  none: false
42
42
  requirements:
43
- - - ">="
43
+ - - ~>
44
44
  - !ruby/object:Gem::Version
45
45
  hash: 31
46
46
  segments:
@@ -56,7 +56,7 @@ dependencies:
56
56
  requirement: &id003 !ruby/object:Gem::Requirement
57
57
  none: false
58
58
  requirements:
59
- - - ">="
59
+ - - ~>
60
60
  - !ruby/object:Gem::Version
61
61
  hash: 15
62
62
  segments:
@@ -72,7 +72,7 @@ dependencies:
72
72
  requirement: &id004 !ruby/object:Gem::Requirement
73
73
  none: false
74
74
  requirements:
75
- - - ">="
75
+ - - ~>
76
76
  - !ruby/object:Gem::Version
77
77
  hash: 23
78
78
  segments:
@@ -88,7 +88,7 @@ dependencies:
88
88
  requirement: &id005 !ruby/object:Gem::Requirement
89
89
  none: false
90
90
  requirements:
91
- - - ">="
91
+ - - ~>
92
92
  - !ruby/object:Gem::Version
93
93
  hash: 1
94
94
  segments:
@@ -104,7 +104,7 @@ dependencies:
104
104
  requirement: &id006 !ruby/object:Gem::Requirement
105
105
  none: false
106
106
  requirements:
107
- - - ">="
107
+ - - ~>
108
108
  - !ruby/object:Gem::Version
109
109
  hash: 3
110
110
  segments:
@@ -122,71 +122,55 @@ dependencies:
122
122
  requirements:
123
123
  - - "="
124
124
  - !ruby/object:Gem::Version
125
- hash: 1
125
+ hash: 55
126
126
  segments:
127
127
  - 0
128
- - 6
129
- - 3
130
- version: 0.6.3
128
+ - 8
129
+ - 4
130
+ version: 0.8.4
131
131
  type: :development
132
132
  version_requirements: *id007
133
133
  - !ruby/object:Gem::Dependency
134
- name: prawn-format
134
+ name: prawn-layout
135
135
  prerelease: false
136
136
  requirement: &id008 !ruby/object:Gem::Requirement
137
137
  none: false
138
138
  requirements:
139
139
  - - "="
140
140
  - !ruby/object:Gem::Version
141
- hash: 17
141
+ hash: 55
142
142
  segments:
143
143
  - 0
144
- - 2
145
- - 3
146
- version: 0.2.3
147
- type: :development
148
- version_requirements: *id008
149
- - !ruby/object:Gem::Dependency
150
- name: htmlentities
151
- prerelease: false
152
- requirement: &id009 !ruby/object:Gem::Requirement
153
- none: false
154
- requirements:
155
- - - ">="
156
- - !ruby/object:Gem::Version
157
- hash: 53
158
- segments:
144
+ - 8
159
145
  - 4
160
- - 2
161
- - 1
162
- version: 4.2.1
146
+ version: 0.8.4
163
147
  type: :development
164
- version_requirements: *id009
148
+ version_requirements: *id008
165
149
  - !ruby/object:Gem::Dependency
166
150
  name: rspec
167
151
  prerelease: false
168
- requirement: &id010 !ruby/object:Gem::Requirement
152
+ requirement: &id009 !ruby/object:Gem::Requirement
169
153
  none: false
170
154
  requirements:
171
- - - ">="
155
+ - - ~>
172
156
  - !ruby/object:Gem::Version
173
- hash: 62196471
157
+ hash: 62196469
174
158
  segments:
175
159
  - 2
176
160
  - 0
177
161
  - 0
178
162
  - beta
179
- - 10
180
- version: 2.0.0.beta.10
163
+ - 11
164
+ version: 2.0.0.beta.11
181
165
  type: :development
182
- version_requirements: *id010
166
+ version_requirements: *id009
183
167
  - !ruby/object:Gem::Dependency
184
168
  name: syntax
185
169
  prerelease: false
186
- requirement: &id011 !ruby/object:Gem::Requirement
170
+ requirement: &id010 !ruby/object:Gem::Requirement
187
171
  none: false
188
172
  requirements:
189
- - - ">="
173
+ - - ~>
190
174
  - !ruby/object:Gem::Version
191
175
  hash: 23
192
176
  segments:
@@ -195,14 +179,14 @@ dependencies:
195
179
  - 0
196
180
  version: 1.0.0
197
181
  type: :development
198
- version_requirements: *id011
182
+ version_requirements: *id010
199
183
  - !ruby/object:Gem::Dependency
200
184
  name: spork
201
185
  prerelease: false
202
- requirement: &id012 !ruby/object:Gem::Requirement
186
+ requirement: &id011 !ruby/object:Gem::Requirement
203
187
  none: false
204
188
  requirements:
205
- - - ">="
189
+ - - ~>
206
190
  - !ruby/object:Gem::Version
207
191
  hash: 57
208
192
  segments:
@@ -211,7 +195,7 @@ dependencies:
211
195
  - 3
212
196
  version: 0.8.3
213
197
  type: :development
214
- version_requirements: *id012
198
+ version_requirements: *id011
215
199
  description: Behaviour Driven Development with elegance and joy
216
200
  email: cukes@googlegroups.com
217
201
  executables:
@@ -224,6 +208,7 @@ extra_rdoc_files:
224
208
  files:
225
209
  - .gitattributes
226
210
  - .gitignore
211
+ - .rspec
227
212
  - Caliper.yml
228
213
  - History.txt
229
214
  - LICENSE
@@ -309,8 +294,8 @@ files:
309
294
  - examples/i18n/he/lib/calculator.rb
310
295
  - examples/i18n/hu/.gitignore
311
296
  - examples/i18n/hu/Rakefile
312
- - examples/i18n/hu/features/addition.feature
313
- - examples/i18n/hu/features/division.feature
297
+ - examples/i18n/hu/features/osszeadas.feature
298
+ - examples/i18n/hu/features/osztas.feature
314
299
  - examples/i18n/hu/features/step_definitons/calculator_steps.rb
315
300
  - examples/i18n/hu/lib/calculator.rb
316
301
  - examples/i18n/id/.gitignore
@@ -428,11 +413,11 @@ files:
428
413
  - examples/i18n/zh-TW/features/step_definitons/calculator_steps.rb
429
414
  - examples/i18n/zh-TW/lib/calculator.rb
430
415
  - examples/json/features/background.feature
416
+ - examples/json/features/embed.feature
431
417
  - examples/json/features/one_passing_one_failing.feature
432
418
  - examples/json/features/pystring.feature
433
419
  - examples/json/features/step_definitions/steps.rb
434
420
  - examples/json/features/tables.feature
435
- - examples/json/tmp/out.json
436
421
  - examples/junit/features/one_passing_one_failing.feature
437
422
  - examples/junit/features/pending.feature
438
423
  - examples/junit/features/step_definitions/steps.rb
@@ -735,6 +720,7 @@ files:
735
720
  - spec/cucumber/formatter/junit_spec.rb
736
721
  - spec/cucumber/formatter/progress_spec.rb
737
722
  - spec/cucumber/formatter/spec_helper.rb
723
+ - spec/cucumber/rb_support/rb_language_spec.rb
738
724
  - spec/cucumber/rb_support/rb_step_definition_spec.rb
739
725
  - spec/cucumber/rb_support/regexp_argument_matcher_spec.rb
740
726
  - spec/cucumber/sell_cucumbers.feature
@@ -759,7 +745,7 @@ post_install_message: |+
759
745
 
760
746
  (::) U P G R A D I N G (::)
761
747
 
762
- Thank you for installing cucumber-0.8.0.
748
+ Thank you for installing cucumber-0.8.1.
763
749
  Please be sure to read http://wiki.github.com/aslakhellesoy/cucumber/upgrading
764
750
  for important information about this release. Happy cuking!
765
751
 
@@ -819,6 +805,7 @@ test_files:
819
805
  - spec/cucumber/formatter/junit_spec.rb
820
806
  - spec/cucumber/formatter/progress_spec.rb
821
807
  - spec/cucumber/formatter/spec_helper.rb
808
+ - spec/cucumber/rb_support/rb_language_spec.rb
822
809
  - spec/cucumber/rb_support/rb_step_definition_spec.rb
823
810
  - spec/cucumber/rb_support/regexp_argument_matcher_spec.rb
824
811
  - spec/cucumber/step_match_spec.rb
@@ -1 +0,0 @@
1
- {"features":[{"tags":["@a"],"file":"features/one_passing_one_failing.feature","elements":[{"tags":["@b"],"keyword":"Scenario","steps":[{"status":"passed","file_colon_line":"features/step_definitions/steps.rb:1","name":"Given a passing step"}],"file_colon_line":"features/one_passing_one_failing.feature:5","name":"Passing"},{"tags":["@c"],"keyword":"Scenario","steps":[{"status":"failed","exception":{"class":"RuntimeError","message":"","backtrace":["./features/step_definitions/steps.rb:6:in `/a failing step/'","features/one_passing_one_failing.feature:10:in `Given a failing step'"]},"file_colon_line":"features/step_definitions/steps.rb:5","name":"Given a failing step"}],"file_colon_line":"features/one_passing_one_failing.feature:9","name":"Failing"}],"name":"One passing scenario, one failing scenario"}]}