cucumber 0.7.3 → 0.8.0
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 +20 -1
- data/Rakefile +4 -4
- data/VERSION.yml +2 -2
- data/cucumber.gemspec +35 -23
- data/examples/json/features/background.feature +7 -0
- data/examples/json/features/one_passing_one_failing.feature +11 -0
- data/examples/json/features/pystring.feature +8 -0
- data/examples/json/features/step_definitions/steps.rb +27 -0
- data/examples/json/features/tables.feature +13 -0
- data/examples/json/tmp/out.json +1 -0
- data/examples/self_test/features/step_definitions/sample_steps.rb +1 -0
- data/examples/tickets/features/around_timeout.feature +6 -0
- data/examples/tickets/features/step_definitons/around_timeout_steps.rb +9 -0
- data/examples/{javascript → v8}/Rakefile +3 -1
- data/examples/{javascript → v8}/features/fibonacci.feature +4 -7
- data/examples/{javascript → v8}/features/step_definitions/fib_steps.js +7 -3
- data/examples/{javascript → v8}/features/support/env.js +3 -0
- data/examples/{javascript/features → v8}/lib/fibonacci.js +0 -0
- data/features/announce.feature +1 -1
- data/features/cucumber_cli_diff_disabled.feature +1 -24
- data/features/custom_formatter.feature +9 -3
- data/features/json_formatter.feature +281 -0
- data/features/step_definitions/cucumber_steps.rb +6 -1
- data/gem_tasks/rspec.rake +1 -1
- data/lib/cucumber/ast/feature.rb +1 -1
- data/lib/cucumber/cli/configuration.rb +8 -12
- data/lib/cucumber/cli/main.rb +0 -8
- data/lib/cucumber/cli/options.rb +22 -21
- data/lib/cucumber/formatter/json.rb +154 -0
- data/lib/cucumber/formatter/json_pretty.rb +14 -0
- data/lib/cucumber/js_support/js_dsl.js +14 -26
- data/lib/cucumber/js_support/js_language.rb +31 -16
- data/lib/cucumber/rb_support/rb_language.rb +22 -3
- data/spec/cucumber/ast/scenario_spec.rb +1 -1
- data/spec/cucumber/cli/configuration_spec.rb +8 -16
- data/spec/cucumber/cli/main_spec.rb +5 -5
- data/spec/cucumber/formatter/html_spec.rb +1 -1
- data/spec/cucumber/rb_support/rb_step_definition_spec.rb +4 -4
- data/spec/cucumber/step_mother_spec.rb +1 -1
- data/spec/cucumber/world/pending_spec.rb +1 -1
- data/spec/spec_helper.rb +1 -1
- metadata +65 -21
- data/lib/cucumber/rspec/diffing.rb +0 -17
@@ -11,7 +11,7 @@ module Cucumber
|
|
11
11
|
extend SpecHelperDsl
|
12
12
|
include SpecHelper
|
13
13
|
|
14
|
-
matcher = defined?(Spec::Matchers) ? Spec::Matchers :
|
14
|
+
matcher = defined?(Spec::Matchers) ? Spec::Matchers : RSpec::Matchers
|
15
15
|
|
16
16
|
matcher.define :have_css_node do |css, regexp|
|
17
17
|
match do |doc|
|
@@ -12,7 +12,7 @@ module Cucumber
|
|
12
12
|
@rb = @step_mother.load_programming_language('rb')
|
13
13
|
@dsl = Object.new
|
14
14
|
@dsl.extend Cucumber::RbSupport::RbDsl
|
15
|
-
@step_mother.before(mock('scenario'
|
15
|
+
@step_mother.before(mock('scenario').as_null_object)
|
16
16
|
|
17
17
|
$inside = nil
|
18
18
|
end
|
@@ -96,7 +96,7 @@ module Cucumber
|
|
96
96
|
|
97
97
|
it "should recognise quotes in name and make according regexp" do
|
98
98
|
@rb.snippet_text('Given', 'A "first" arg', nil).should == unindented(%{
|
99
|
-
Given /^A "([
|
99
|
+
Given /^A "([^"]*)" arg$/ do |arg1|
|
100
100
|
pending # express the regexp above with the code you wish you had
|
101
101
|
end
|
102
102
|
})
|
@@ -104,7 +104,7 @@ module Cucumber
|
|
104
104
|
|
105
105
|
it "should recognise several quoted words in name and make according regexp and args" do
|
106
106
|
@rb.snippet_text('Given', 'A "first" and "second" arg', nil).should == unindented(%{
|
107
|
-
Given /^A "([
|
107
|
+
Given /^A "([^"]*)" and "([^"]*)" arg$/ do |arg1, arg2|
|
108
108
|
pending # express the regexp above with the code you wish you had
|
109
109
|
end
|
110
110
|
})
|
@@ -120,7 +120,7 @@ module Cucumber
|
|
120
120
|
|
121
121
|
it "should be helpful with tables" do
|
122
122
|
@rb.snippet_text('Given', 'A "first" arg', Cucumber::Ast::Table).should == unindented(%{
|
123
|
-
Given /^A "([
|
123
|
+
Given /^A "([^"]*)" arg$/ do |arg1, table|
|
124
124
|
# table is a Cucumber::Ast::Table
|
125
125
|
pending # express the regexp above with the code you wish you had
|
126
126
|
end
|
@@ -137,7 +137,7 @@ spec/cucumber/step_mother_spec.rb:48:in `/Three cute (.*)/'
|
|
137
137
|
|
138
138
|
it "should implicitly extend world with modules" do
|
139
139
|
@dsl.World(ModuleOne, ModuleTwo)
|
140
|
-
@step_mother.before(mock('scenario'
|
140
|
+
@step_mother.before(mock('scenario').as_null_object)
|
141
141
|
class << @rb.current_world
|
142
142
|
included_modules.inspect.should =~ /ModuleOne/ # Workaround for RSpec/Ruby 1.9 issue with namespaces
|
143
143
|
included_modules.inspect.should =~ /ModuleTwo/
|
data/spec/spec_helper.rb
CHANGED
metadata
CHANGED
@@ -1,12 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: cucumber
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
+
hash: 63
|
4
5
|
prerelease: false
|
5
6
|
segments:
|
6
7
|
- 0
|
7
|
-
-
|
8
|
-
-
|
9
|
-
version: 0.
|
8
|
+
- 8
|
9
|
+
- 0
|
10
|
+
version: 0.8.0
|
10
11
|
platform: ruby
|
11
12
|
authors:
|
12
13
|
- "Aslak Helles\xC3\xB8y"
|
@@ -14,30 +15,34 @@ autorequire:
|
|
14
15
|
bindir: bin
|
15
16
|
cert_chain: []
|
16
17
|
|
17
|
-
date: 2010-
|
18
|
+
date: 2010-06-06 00:00:00 -04:00
|
18
19
|
default_executable: cucumber
|
19
20
|
dependencies:
|
20
21
|
- !ruby/object:Gem::Dependency
|
21
22
|
name: gherkin
|
22
23
|
prerelease: false
|
23
24
|
requirement: &id001 !ruby/object:Gem::Requirement
|
25
|
+
none: false
|
24
26
|
requirements:
|
25
27
|
- - ">="
|
26
28
|
- !ruby/object:Gem::Version
|
29
|
+
hash: 43
|
27
30
|
segments:
|
28
31
|
- 1
|
29
32
|
- 0
|
30
|
-
-
|
31
|
-
version: 1.0.
|
33
|
+
- 30
|
34
|
+
version: 1.0.30
|
32
35
|
type: :runtime
|
33
36
|
version_requirements: *id001
|
34
37
|
- !ruby/object:Gem::Dependency
|
35
38
|
name: term-ansicolor
|
36
39
|
prerelease: false
|
37
40
|
requirement: &id002 !ruby/object:Gem::Requirement
|
41
|
+
none: false
|
38
42
|
requirements:
|
39
43
|
- - ">="
|
40
44
|
- !ruby/object:Gem::Version
|
45
|
+
hash: 31
|
41
46
|
segments:
|
42
47
|
- 1
|
43
48
|
- 0
|
@@ -49,9 +54,11 @@ dependencies:
|
|
49
54
|
name: builder
|
50
55
|
prerelease: false
|
51
56
|
requirement: &id003 !ruby/object:Gem::Requirement
|
57
|
+
none: false
|
52
58
|
requirements:
|
53
59
|
- - ">="
|
54
60
|
- !ruby/object:Gem::Version
|
61
|
+
hash: 15
|
55
62
|
segments:
|
56
63
|
- 2
|
57
64
|
- 1
|
@@ -63,9 +70,11 @@ dependencies:
|
|
63
70
|
name: diff-lcs
|
64
71
|
prerelease: false
|
65
72
|
requirement: &id004 !ruby/object:Gem::Requirement
|
73
|
+
none: false
|
66
74
|
requirements:
|
67
75
|
- - ">="
|
68
76
|
- !ruby/object:Gem::Version
|
77
|
+
hash: 23
|
69
78
|
segments:
|
70
79
|
- 1
|
71
80
|
- 1
|
@@ -77,37 +86,43 @@ dependencies:
|
|
77
86
|
name: json_pure
|
78
87
|
prerelease: false
|
79
88
|
requirement: &id005 !ruby/object:Gem::Requirement
|
89
|
+
none: false
|
80
90
|
requirements:
|
81
91
|
- - ">="
|
82
92
|
- !ruby/object:Gem::Version
|
93
|
+
hash: 1
|
83
94
|
segments:
|
84
95
|
- 1
|
85
|
-
- 2
|
86
96
|
- 4
|
87
|
-
|
97
|
+
- 3
|
98
|
+
version: 1.4.3
|
88
99
|
type: :runtime
|
89
100
|
version_requirements: *id005
|
90
101
|
- !ruby/object:Gem::Dependency
|
91
102
|
name: nokogiri
|
92
103
|
prerelease: false
|
93
104
|
requirement: &id006 !ruby/object:Gem::Requirement
|
105
|
+
none: false
|
94
106
|
requirements:
|
95
107
|
- - ">="
|
96
108
|
- !ruby/object:Gem::Version
|
109
|
+
hash: 3
|
97
110
|
segments:
|
98
111
|
- 1
|
99
112
|
- 4
|
100
|
-
-
|
101
|
-
version: 1.4.
|
113
|
+
- 2
|
114
|
+
version: 1.4.2
|
102
115
|
type: :development
|
103
116
|
version_requirements: *id006
|
104
117
|
- !ruby/object:Gem::Dependency
|
105
118
|
name: prawn
|
106
119
|
prerelease: false
|
107
120
|
requirement: &id007 !ruby/object:Gem::Requirement
|
121
|
+
none: false
|
108
122
|
requirements:
|
109
123
|
- - "="
|
110
124
|
- !ruby/object:Gem::Version
|
125
|
+
hash: 1
|
111
126
|
segments:
|
112
127
|
- 0
|
113
128
|
- 6
|
@@ -119,9 +134,11 @@ dependencies:
|
|
119
134
|
name: prawn-format
|
120
135
|
prerelease: false
|
121
136
|
requirement: &id008 !ruby/object:Gem::Requirement
|
137
|
+
none: false
|
122
138
|
requirements:
|
123
139
|
- - "="
|
124
140
|
- !ruby/object:Gem::Version
|
141
|
+
hash: 17
|
125
142
|
segments:
|
126
143
|
- 0
|
127
144
|
- 2
|
@@ -133,9 +150,11 @@ dependencies:
|
|
133
150
|
name: htmlentities
|
134
151
|
prerelease: false
|
135
152
|
requirement: &id009 !ruby/object:Gem::Requirement
|
153
|
+
none: false
|
136
154
|
requirements:
|
137
155
|
- - ">="
|
138
156
|
- !ruby/object:Gem::Version
|
157
|
+
hash: 53
|
139
158
|
segments:
|
140
159
|
- 4
|
141
160
|
- 2
|
@@ -147,23 +166,29 @@ dependencies:
|
|
147
166
|
name: rspec
|
148
167
|
prerelease: false
|
149
168
|
requirement: &id010 !ruby/object:Gem::Requirement
|
169
|
+
none: false
|
150
170
|
requirements:
|
151
171
|
- - ">="
|
152
172
|
- !ruby/object:Gem::Version
|
173
|
+
hash: 62196471
|
153
174
|
segments:
|
154
|
-
-
|
155
|
-
- 3
|
175
|
+
- 2
|
156
176
|
- 0
|
157
|
-
|
177
|
+
- 0
|
178
|
+
- beta
|
179
|
+
- 10
|
180
|
+
version: 2.0.0.beta.10
|
158
181
|
type: :development
|
159
182
|
version_requirements: *id010
|
160
183
|
- !ruby/object:Gem::Dependency
|
161
184
|
name: syntax
|
162
185
|
prerelease: false
|
163
186
|
requirement: &id011 !ruby/object:Gem::Requirement
|
187
|
+
none: false
|
164
188
|
requirements:
|
165
189
|
- - ">="
|
166
190
|
- !ruby/object:Gem::Version
|
191
|
+
hash: 23
|
167
192
|
segments:
|
168
193
|
- 1
|
169
194
|
- 0
|
@@ -175,9 +200,11 @@ dependencies:
|
|
175
200
|
name: spork
|
176
201
|
prerelease: false
|
177
202
|
requirement: &id012 !ruby/object:Gem::Requirement
|
203
|
+
none: false
|
178
204
|
requirements:
|
179
205
|
- - ">="
|
180
206
|
- !ruby/object:Gem::Version
|
207
|
+
hash: 57
|
181
208
|
segments:
|
182
209
|
- 0
|
183
210
|
- 8
|
@@ -400,11 +427,12 @@ files:
|
|
400
427
|
- examples/i18n/zh-TW/features/division.feature
|
401
428
|
- examples/i18n/zh-TW/features/step_definitons/calculator_steps.rb
|
402
429
|
- examples/i18n/zh-TW/lib/calculator.rb
|
403
|
-
- examples/
|
404
|
-
- examples/
|
405
|
-
- examples/
|
406
|
-
- examples/
|
407
|
-
- examples/
|
430
|
+
- examples/json/features/background.feature
|
431
|
+
- examples/json/features/one_passing_one_failing.feature
|
432
|
+
- examples/json/features/pystring.feature
|
433
|
+
- examples/json/features/step_definitions/steps.rb
|
434
|
+
- examples/json/features/tables.feature
|
435
|
+
- examples/json/tmp/out.json
|
408
436
|
- examples/junit/features/one_passing_one_failing.feature
|
409
437
|
- examples/junit/features/pending.feature
|
410
438
|
- examples/junit/features/step_definitions/steps.rb
|
@@ -494,17 +522,24 @@ files:
|
|
494
522
|
- examples/tickets/features/301/filter_background_tagged_hooks.feature
|
495
523
|
- examples/tickets/features/301/filter_background_tagged_hooks_steps.rb
|
496
524
|
- examples/tickets/features/306/only_background.feature
|
525
|
+
- examples/tickets/features/around_timeout.feature
|
497
526
|
- examples/tickets/features/half_manual.feature
|
498
527
|
- examples/tickets/features/lib/eatting_machine.rb
|
499
528
|
- examples/tickets/features/lib/pantry.rb
|
500
529
|
- examples/tickets/features/scenario_outline.feature
|
501
530
|
- examples/tickets/features/step_definitons/246_steps.rb
|
502
531
|
- examples/tickets/features/step_definitons/248_steps.rb
|
532
|
+
- examples/tickets/features/step_definitons/around_timeout_steps.rb
|
503
533
|
- examples/tickets/features/step_definitons/half_manual_steps.rb
|
504
534
|
- examples/tickets/features/step_definitons/scenario_outline_steps.rb
|
505
535
|
- examples/tickets/features/step_definitons/tickets_steps.rb
|
506
536
|
- examples/tickets/features/table_diffing.feature
|
507
537
|
- examples/tickets/features/tickets.feature
|
538
|
+
- examples/v8/Rakefile
|
539
|
+
- examples/v8/features/fibonacci.feature
|
540
|
+
- examples/v8/features/step_definitions/fib_steps.js
|
541
|
+
- examples/v8/features/support/env.js
|
542
|
+
- examples/v8/lib/fibonacci.js
|
508
543
|
- examples/watir/.gitignore
|
509
544
|
- examples/watir/README.textile
|
510
545
|
- examples/watir/Rakefile
|
@@ -539,6 +574,7 @@ files:
|
|
539
574
|
- features/expand.feature
|
540
575
|
- features/html_formatter.feature
|
541
576
|
- features/html_formatter/a.html
|
577
|
+
- features/json_formatter.feature
|
542
578
|
- features/junit_formatter.feature
|
543
579
|
- features/language_from_header.feature
|
544
580
|
- features/language_help.feature
|
@@ -628,6 +664,8 @@ files:
|
|
628
664
|
- lib/cucumber/formatter/duration.rb
|
629
665
|
- lib/cucumber/formatter/html.rb
|
630
666
|
- lib/cucumber/formatter/io.rb
|
667
|
+
- lib/cucumber/formatter/json.rb
|
668
|
+
- lib/cucumber/formatter/json_pretty.rb
|
631
669
|
- lib/cucumber/formatter/junit.rb
|
632
670
|
- lib/cucumber/formatter/ordered_xml_markup.rb
|
633
671
|
- lib/cucumber/formatter/pdf.rb
|
@@ -659,7 +697,6 @@ files:
|
|
659
697
|
- lib/cucumber/rb_support/rb_transform.rb
|
660
698
|
- lib/cucumber/rb_support/rb_world.rb
|
661
699
|
- lib/cucumber/rb_support/regexp_argument_matcher.rb
|
662
|
-
- lib/cucumber/rspec/diffing.rb
|
663
700
|
- lib/cucumber/rspec/disable_option_parser.rb
|
664
701
|
- lib/cucumber/step_argument.rb
|
665
702
|
- lib/cucumber/step_definition_light.rb
|
@@ -711,6 +748,7 @@ files:
|
|
711
748
|
- spec/cucumber/wire_support/wire_step_definition_spec.rb
|
712
749
|
- spec/cucumber/world/pending_spec.rb
|
713
750
|
- spec/spec_helper.rb
|
751
|
+
- examples/self_test/tmp/features/step_definitions/steps.rb
|
714
752
|
has_rdoc: true
|
715
753
|
homepage: http://cukes.info
|
716
754
|
licenses: []
|
@@ -721,7 +759,7 @@ post_install_message: |+
|
|
721
759
|
|
722
760
|
(::) U P G R A D I N G (::)
|
723
761
|
|
724
|
-
Thank you for installing cucumber-0.
|
762
|
+
Thank you for installing cucumber-0.8.0.
|
725
763
|
Please be sure to read http://wiki.github.com/aslakhellesoy/cucumber/upgrading
|
726
764
|
for important information about this release. Happy cuking!
|
727
765
|
|
@@ -732,23 +770,27 @@ rdoc_options:
|
|
732
770
|
require_paths:
|
733
771
|
- lib
|
734
772
|
required_ruby_version: !ruby/object:Gem::Requirement
|
773
|
+
none: false
|
735
774
|
requirements:
|
736
775
|
- - ">="
|
737
776
|
- !ruby/object:Gem::Version
|
777
|
+
hash: 3
|
738
778
|
segments:
|
739
779
|
- 0
|
740
780
|
version: "0"
|
741
781
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
782
|
+
none: false
|
742
783
|
requirements:
|
743
784
|
- - ">="
|
744
785
|
- !ruby/object:Gem::Version
|
786
|
+
hash: 3
|
745
787
|
segments:
|
746
788
|
- 0
|
747
789
|
version: "0"
|
748
790
|
requirements: []
|
749
791
|
|
750
792
|
rubyforge_project:
|
751
|
-
rubygems_version: 1.3.
|
793
|
+
rubygems_version: 1.3.7
|
752
794
|
signing_key:
|
753
795
|
specification_version: 3
|
754
796
|
summary: Behaviour Driven Development with elegance and joy
|
@@ -873,6 +915,7 @@ test_files:
|
|
873
915
|
- examples/i18n/zh-CN/lib/calculator.rb
|
874
916
|
- examples/i18n/zh-TW/features/step_definitons/calculator_steps.rb
|
875
917
|
- examples/i18n/zh-TW/lib/calculator.rb
|
918
|
+
- examples/json/features/step_definitions/steps.rb
|
876
919
|
- examples/junit/features/step_definitions/steps.rb
|
877
920
|
- examples/ramaze/app.rb
|
878
921
|
- examples/ramaze/features/step_definitions/add_steps.rb
|
@@ -899,6 +942,7 @@ test_files:
|
|
899
942
|
- examples/tickets/features/lib/pantry.rb
|
900
943
|
- examples/tickets/features/step_definitons/246_steps.rb
|
901
944
|
- examples/tickets/features/step_definitons/248_steps.rb
|
945
|
+
- examples/tickets/features/step_definitons/around_timeout_steps.rb
|
902
946
|
- examples/tickets/features/step_definitons/half_manual_steps.rb
|
903
947
|
- examples/tickets/features/step_definitons/scenario_outline_steps.rb
|
904
948
|
- examples/tickets/features/step_definitons/tickets_steps.rb
|
@@ -1,17 +0,0 @@
|
|
1
|
-
require 'ostruct'
|
2
|
-
|
3
|
-
options = OpenStruct.new(:diff_format => :unified, :context_lines => 3)
|
4
|
-
|
5
|
-
begin
|
6
|
-
# RSpec >=2.0
|
7
|
-
require 'rspec/expectations'
|
8
|
-
require 'rspec/expectations/differs/default'
|
9
|
-
Rspec::Expectations.differ = ::Rspec::Expectations::Differs::Default.new(options)
|
10
|
-
rescue LoadError => try_rspec_1_2_4_or_higher
|
11
|
-
begin
|
12
|
-
require 'spec/expectations'
|
13
|
-
require 'spec/runner/differs/default'
|
14
|
-
Spec::Expectations.differ = Spec::Expectations::Differs::Default.new(options)
|
15
|
-
rescue LoadError => give_up
|
16
|
-
end
|
17
|
-
end
|