cucumber 0.3.93 → 0.3.94
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 +67 -38
- data/Manifest.txt +8 -0
- data/Rakefile +1 -1
- data/cucumber.yml +2 -2
- data/examples/python/features/fibonacci.feature +19 -0
- data/examples/python/features/step_definitions/fib_steps.rb +7 -0
- data/examples/python/features/support/env.rb +21 -0
- data/examples/python/lib/fib.py +7 -0
- data/examples/self_test/features/tags_sample.feature +17 -0
- data/examples/sinatra/README.textile +13 -0
- data/features/cucumber_cli.feature +85 -3
- data/features/custom_formatter.feature +2 -2
- data/features/html_formatter/a.html +1 -1
- data/features/junit_formatter.feature +19 -12
- data/features/step_definitions/cucumber_steps.rb +8 -15
- data/features/support/env.rb +4 -5
- data/gem_tasks/contributors.rake +4 -0
- data/lib/cucumber/ast/feature.rb +13 -0
- data/lib/cucumber/ast/feature_element.rb +8 -4
- data/lib/cucumber/ast/features.rb +6 -1
- data/lib/cucumber/ast/table.rb +13 -6
- data/lib/cucumber/ast/tags.rb +9 -1
- data/lib/cucumber/cli/configuration.rb +3 -15
- data/lib/cucumber/cli/main.rb +25 -8
- data/lib/cucumber/cli/options.rb +53 -31
- data/lib/cucumber/filter.rb +4 -3
- data/lib/cucumber/formatter/ansicolor.rb +42 -9
- data/lib/cucumber/formatter/console.rb +38 -6
- data/lib/cucumber/formatter/html.rb +2 -8
- data/lib/cucumber/formatter/junit.rb +65 -24
- data/lib/cucumber/formatter/ordered_xml_markup.rb +24 -0
- data/lib/cucumber/formatter/pretty.rb +9 -4
- data/lib/cucumber/formatter/progress.rb +7 -1
- data/lib/cucumber/rake/task.rb +3 -3
- data/lib/cucumber/step_mother.rb +3 -1
- data/lib/cucumber/version.rb +1 -1
- data/rails_generators/cucumber/templates/cucumber.rake +18 -6
- data/spec/cucumber/ast/scenario_outline_spec.rb +2 -2
- data/spec/cucumber/ast/table_spec.rb +5 -0
- data/spec/cucumber/cli/configuration_spec.rb +2 -1
- data/spec/cucumber/cli/options_spec.rb +11 -6
- metadata +10 -2
data/lib/cucumber/step_mother.rb
CHANGED
@@ -127,7 +127,9 @@ module Cucumber
|
|
127
127
|
end
|
128
128
|
|
129
129
|
# Registers a new StepDefinition. This method is aliased
|
130
|
-
# to <tt>Given</tt>, <tt>When</tt> and <tt>Then</tt
|
130
|
+
# to <tt>Given</tt>, <tt>When</tt> and <tt>Then</tt>, and
|
131
|
+
# also to the i18n translations whenever a feature of a
|
132
|
+
# new language is loaded.
|
131
133
|
#
|
132
134
|
# See Cucumber#alias_steps for details on how to
|
133
135
|
# create your own aliases.
|
data/lib/cucumber/version.rb
CHANGED
@@ -4,15 +4,27 @@ unless ARGV.any? {|a| a =~ /^gems/}
|
|
4
4
|
|
5
5
|
begin
|
6
6
|
require 'cucumber/rake/task'
|
7
|
+
namespace :cucumber do
|
8
|
+
Cucumber::Rake::Task.new({:ok => 'db:test:prepare'}, 'Run features that should pass') do |t|
|
9
|
+
t.fork = true # You may get faster startup if you set this to false
|
10
|
+
t.cucumber_opts = "--tags ~@wip --strict --format #{ENV['CUCUMBER_FORMAT'] || 'pretty'}<%= spork? ? ' --drb' : '' %>"
|
11
|
+
end
|
7
12
|
|
8
|
-
|
9
|
-
|
10
|
-
|
13
|
+
Cucumber::Rake::Task.new({:wip => 'db:test:prepare'}, 'Run features that are being worked on') do |t|
|
14
|
+
t.fork = true # You may get faster startup if you set this to false
|
15
|
+
t.cucumber_opts = "--tags @wip:2 --wip --format #{ENV['CUCUMBER_FORMAT'] || 'pretty'}<%= spork? ? ' --drb' : '' %>"
|
16
|
+
end
|
17
|
+
|
18
|
+
desc 'Run all features'
|
19
|
+
task :all => [:ok, :wip]
|
20
|
+
end
|
21
|
+
|
22
|
+
task :features => 'cucumber:ok' do
|
23
|
+
STDERR.puts "*** The 'features' task is deprecated. See rake -T cucumber ***"
|
11
24
|
end
|
12
|
-
task :features => 'db:test:prepare'
|
13
25
|
rescue LoadError
|
14
|
-
desc '
|
15
|
-
task :
|
26
|
+
desc 'cucumber rake task not available (cucumber not installed)'
|
27
|
+
task :cucumber do
|
16
28
|
abort 'Cucumber rake task is not available. Be sure to install cucumber as a gem or plugin'
|
17
29
|
end
|
18
30
|
end
|
@@ -47,7 +47,7 @@ module Cucumber
|
|
47
47
|
]
|
48
48
|
]
|
49
49
|
]
|
50
|
-
|
50
|
+
|
51
51
|
)
|
52
52
|
end
|
53
53
|
|
@@ -59,7 +59,7 @@ module Cucumber
|
|
59
59
|
|
60
60
|
it "should pretty print" do
|
61
61
|
require 'cucumber/formatter/pretty'
|
62
|
-
visitor = Formatter::Pretty.new(@step_mother, STDOUT, {:comment => true})
|
62
|
+
visitor = Formatter::Pretty.new(@step_mother, STDOUT, {:comment => true, :include_tags => {}, :exclude_tags => {}})
|
63
63
|
visitor.visit_feature_element(@scenario_outline)
|
64
64
|
end
|
65
65
|
end
|
@@ -101,6 +101,11 @@ module Cucumber
|
|
101
101
|
table2.hashes.first[:three].should == '4444'
|
102
102
|
end
|
103
103
|
|
104
|
+
it "should allow renaming columns using regexp" do
|
105
|
+
table2 = @table.map_headers(/one|uno/ => :three)
|
106
|
+
table2.hashes.first[:three].should == '4444'
|
107
|
+
end
|
108
|
+
|
104
109
|
it "should copy column mappings when mapping headers" do
|
105
110
|
@table.map_column!('one') { |v| v.to_i }
|
106
111
|
table2 = @table.map_headers('one' => 'three')
|
@@ -361,7 +361,8 @@ END_OF_MESSAGE
|
|
361
361
|
|
362
362
|
it "should accept --no-color option" do
|
363
363
|
Term::ANSIColor.should_receive(:coloring=).with(false)
|
364
|
-
config.
|
364
|
+
config = Configuration.new(StringIO.new)
|
365
|
+
config.parse!(['--no-color'])
|
365
366
|
end
|
366
367
|
|
367
368
|
describe "--backtrace" do
|
@@ -87,10 +87,10 @@ module Cli
|
|
87
87
|
|
88
88
|
context '-t TAGS --tags TAGS' do
|
89
89
|
it "removes the @ prefix" do
|
90
|
-
after_parsing('-t @foo,bar') { options[:include_tags].should ==
|
90
|
+
after_parsing('-t @foo,bar') { options[:include_tags].should == {'foo' => nil, 'bar' => nil} }
|
91
91
|
end
|
92
92
|
it "designates tags prefixed with ~ as tags to be excluded" do
|
93
|
-
after_parsing('--tags ~@foo,bar') { options[:exclude_tags].should ==
|
93
|
+
after_parsing('--tags ~@foo,bar') { options[:exclude_tags].should == {'foo' => nil} }
|
94
94
|
end
|
95
95
|
end
|
96
96
|
|
@@ -157,13 +157,13 @@ module Cli
|
|
157
157
|
it "combines the include_tags of both" do
|
158
158
|
given_cucumber_yml_defined_as('baz' => %w[-t bar])
|
159
159
|
options.parse!(%w[--tags foo -p baz])
|
160
|
-
options[:include_tags].should ==
|
160
|
+
options[:include_tags].should == {'foo' => nil, 'bar' => nil}
|
161
161
|
end
|
162
162
|
|
163
163
|
it "combines the exclude_tags of both" do
|
164
164
|
given_cucumber_yml_defined_as('baz' => %w[-t ~bar])
|
165
165
|
options.parse!(%w[--tags ~foo -p baz])
|
166
|
-
options[:exclude_tags].should ==
|
166
|
+
options[:exclude_tags].should == {'foo' => nil, 'bar' => nil}
|
167
167
|
end
|
168
168
|
|
169
169
|
it "only takes the paths from the original options, and disgregards the profiles" do
|
@@ -269,8 +269,6 @@ module Cli
|
|
269
269
|
options[:paths].should == ['my_feature.feature']
|
270
270
|
end
|
271
271
|
end
|
272
|
-
|
273
|
-
|
274
272
|
end
|
275
273
|
|
276
274
|
describe '#expanded_args_without_drb' do
|
@@ -295,6 +293,13 @@ module Cli
|
|
295
293
|
options.expanded_args_without_drb.should == %w[features FOO=bar]
|
296
294
|
end
|
297
295
|
|
296
|
+
it "ignores the paths from the profiles if one was specified on the command line" do
|
297
|
+
given_cucumber_yml_defined_as('foo' => 'features --drb')
|
298
|
+
options.parse!(%w[some_feature.feature -p foo])
|
299
|
+
options.expanded_args_without_drb.should == %w[some_feature.feature]
|
300
|
+
end
|
301
|
+
|
302
|
+
|
298
303
|
|
299
304
|
|
300
305
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: cucumber
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.3.
|
4
|
+
version: 0.3.94
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- "Aslak Helles\xC3\xB8y"
|
@@ -9,7 +9,7 @@ autorequire:
|
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
11
|
|
12
|
-
date: 2009-08-
|
12
|
+
date: 2009-08-06 00:00:00 +02:00
|
13
13
|
default_executable:
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
@@ -234,6 +234,10 @@ files:
|
|
234
234
|
- examples/junit/features/pending.feature
|
235
235
|
- examples/junit/features/step_definitions/steps.rb
|
236
236
|
- examples/pure_java/README.textile
|
237
|
+
- examples/python/features/fibonacci.feature
|
238
|
+
- examples/python/features/step_definitions/fib_steps.rb
|
239
|
+
- examples/python/features/support/env.rb
|
240
|
+
- examples/python/lib/fib.py
|
237
241
|
- examples/selenium/Rakefile
|
238
242
|
- examples/selenium/features/search.feature
|
239
243
|
- examples/selenium/features/step_definitons/search_steps.rb
|
@@ -263,8 +267,10 @@ files:
|
|
263
267
|
- examples/self_test/features/search_sample.feature
|
264
268
|
- examples/self_test/features/step_definitions/sample_steps.rb
|
265
269
|
- examples/self_test/features/support/env.rb
|
270
|
+
- examples/self_test/features/tags_sample.feature
|
266
271
|
- examples/self_test/features/tons_of_cukes.feature
|
267
272
|
- examples/self_test/features/undefined_multiline_args.feature
|
273
|
+
- examples/sinatra/README.textile
|
268
274
|
- examples/sinatra/Rakefile
|
269
275
|
- examples/sinatra/app.rb
|
270
276
|
- examples/sinatra/features/add.feature
|
@@ -341,6 +347,7 @@ files:
|
|
341
347
|
- features/unicode_table.feature
|
342
348
|
- features/usage.feature
|
343
349
|
- features/work_in_progress.feature
|
350
|
+
- gem_tasks/contributors.rake
|
344
351
|
- gem_tasks/deployment.rake
|
345
352
|
- gem_tasks/environment.rake
|
346
353
|
- gem_tasks/features.rake
|
@@ -395,6 +402,7 @@ files:
|
|
395
402
|
- lib/cucumber/formatter/duration.rb
|
396
403
|
- lib/cucumber/formatter/html.rb
|
397
404
|
- lib/cucumber/formatter/junit.rb
|
405
|
+
- lib/cucumber/formatter/ordered_xml_markup.rb
|
398
406
|
- lib/cucumber/formatter/pretty.rb
|
399
407
|
- lib/cucumber/formatter/profile.rb
|
400
408
|
- lib/cucumber/formatter/progress.rb
|