cucumber 0.5.3 → 0.6.0
Sign up to get free protection for your applications and to get access to all the features.
- data/History.txt +25 -0
- data/Rakefile +4 -3
- data/VERSION.yml +3 -2
- data/cucumber.gemspec +21 -16
- data/cucumber.yml +5 -3
- data/examples/i18n/ar/features/step_definitons/calculator_steps.rb +1 -1
- data/examples/i18n/bg/features/support/env.rb +1 -2
- data/examples/i18n/cat/features/step_definitons/calculator_steps.rb +1 -1
- data/examples/i18n/da/features/step_definitons/lommeregner_steps.rb +1 -1
- data/examples/i18n/de/features/step_definitons/calculator_steps.rb +1 -1
- data/examples/i18n/en-lol/features/support/env.rb +0 -1
- data/examples/i18n/en/features/step_definitons/calculator_steps.rb +2 -2
- data/examples/i18n/es/features/step_definitons/calculador_steps.rb +2 -2
- data/examples/i18n/et/features/step_definitions/kalkulaator_steps.rb +1 -1
- data/examples/i18n/fi/features/step_definitons/laskin_steps.rb +1 -1
- data/examples/i18n/fr/features/step_definitions/calculatrice_steps.rb +0 -6
- data/examples/i18n/fr/features/support/env.rb +5 -0
- data/examples/i18n/he/features/step_definitons/calculator_steps.rb +1 -1
- data/examples/i18n/he/lib/calculator.rb +1 -0
- data/examples/i18n/hu/features/step_definitons/calculator_steps.rb +1 -1
- data/examples/i18n/id/features/step_definitons/calculator_steps.rb +1 -1
- data/examples/i18n/it/features/step_definitons/calcolatrice_steps.rb +1 -1
- data/examples/i18n/ja/features/step_definitons/calculator_steps.rb +0 -5
- data/examples/i18n/ja/features/support/env.rb +5 -0
- data/examples/i18n/ko/features/step_definitons/calculator_steps.rb +1 -1
- data/examples/i18n/lt/features/step_definitons/calculator_steps.rb +1 -1
- data/examples/i18n/lv/features/step_definitons/calculator_steps.rb +1 -1
- data/examples/i18n/no/features/support/env.rb +1 -2
- data/examples/i18n/pl/features/step_definitons/calculator_steps.rb +1 -1
- data/examples/i18n/pl/features/support/env.rb +1 -2
- data/examples/i18n/pt/features/support/env.rb +1 -2
- data/examples/i18n/ro/features/step_definitons/calculator_steps.rb +1 -1
- data/examples/i18n/ru/features/support/env.rb +1 -2
- data/examples/i18n/se/features/step_definitons/kalkulator_steps.rb +1 -1
- data/examples/i18n/sk/features/step_definitons/calculator_steps.rb +1 -1
- data/examples/i18n/sr-latn/features/step_definitons/calculator_steps.rb +3 -3
- data/examples/i18n/sr/features/step_definitons/calculator_steps.rb +1 -5
- data/examples/i18n/sr/features/support/env.rb +5 -0
- data/examples/i18n/tr/features/step_definitons/hesap_makinesi_adimlari.rb +1 -1
- data/examples/i18n/uz/features/support/env.rb +1 -2
- data/examples/i18n/zh-CN/features/step_definitons/calculator_steps.rb +1 -1
- data/examples/i18n/zh-TW/features/step_definitons/calculator_steps.rb +1 -1
- data/examples/self_test/features/step_definitions/sample_steps.rb +2 -0
- data/examples/watir/features/support/screenshots.rb +20 -17
- data/features/call_many_steps.feature +2 -0
- data/features/cucumber_cli.feature +7 -4
- data/features/html_formatter.feature +1 -0
- data/features/html_formatter/a.html +2 -2
- data/features/language_help.feature +1 -0
- data/features/step_definitions/cucumber_steps.rb +3 -3
- data/features/support/env.rb +7 -5
- data/features/tag_logic.feature +7 -7
- data/features/wire_protocol.feature +1 -1
- data/gem_tasks/features.rake +2 -0
- data/lib/autotest/cucumber_mixin.rb +4 -4
- data/lib/cucumber/ast.rb +0 -1
- data/lib/cucumber/ast/feature.rb +9 -12
- data/lib/cucumber/ast/feature_element.rb +4 -4
- data/lib/cucumber/ast/features.rb +2 -2
- data/lib/cucumber/ast/table.rb +1 -0
- data/lib/cucumber/ast/tags.rb +1 -97
- data/lib/cucumber/cli/configuration.rb +3 -1
- data/lib/cucumber/cli/main.rb +20 -23
- data/lib/cucumber/cli/options.rb +9 -18
- data/lib/cucumber/filter.rb +4 -2
- data/lib/cucumber/formatter/console.rb +8 -28
- data/lib/cucumber/formatter/html.rb +1 -1
- data/lib/cucumber/formatter/pdf.rb +0 -4
- data/lib/cucumber/formatter/pretty.rb +1 -2
- data/lib/cucumber/formatter/progress.rb +1 -5
- data/lib/cucumber/formatter/rerun.rb +2 -0
- data/lib/cucumber/formatter/unicode.rb +6 -6
- data/lib/cucumber/language_support/language_methods.rb +0 -1
- data/lib/cucumber/parser/common.rb +16 -4
- data/lib/cucumber/parser/feature.rb +92 -27
- data/lib/cucumber/parser/feature.tt +8 -6
- data/lib/cucumber/parser/py_string.rb +12 -3
- data/lib/cucumber/parser/table.rb +12 -3
- data/lib/cucumber/rb_support/rb_dsl.rb +6 -6
- data/lib/cucumber/rb_support/rb_hook.rb +4 -5
- data/lib/cucumber/rb_support/rb_language.rb +1 -1
- data/lib/cucumber/tag_expression.rb +41 -0
- data/spec/cucumber/ast/feature_spec.rb +23 -2
- data/spec/cucumber/ast/scenario_outline_spec.rb +0 -7
- data/spec/cucumber/cli/options_spec.rb +3 -3
- data/spec/cucumber/formatter/html_spec.rb +10 -0
- data/spec/cucumber/formatter/spec_helper.rb +2 -1
- data/spec/cucumber/tag_expression_spec.rb +127 -0
- metadata +15 -10
- data/spec/cucumber/ast/tags_spec.rb +0 -29
- data/spec/cucumber/formatter/console_spec.rb +0 -20
@@ -1,6 +1,5 @@
|
|
1
1
|
# encoding: utf-8
|
2
|
-
$KCODE='u' unless Cucumber::RUBY_1_9
|
3
2
|
require 'spec/expectations'
|
4
|
-
$:.unshift(File.dirname(__FILE__) + '/../../lib') # This line is not needed in your own project
|
5
3
|
require 'cucumber/formatter/unicode'
|
4
|
+
$:.unshift(File.dirname(__FILE__) + '/../../lib')
|
6
5
|
require 'kalkulator'
|
@@ -1,7 +1,7 @@
|
|
1
1
|
# encoding: utf-8
|
2
2
|
require 'spec/expectations'
|
3
|
-
$:.unshift(File.dirname(__FILE__) + '/../../lib') # This line is not needed in your own project
|
4
3
|
require 'cucumber/formatter/unicode'
|
4
|
+
$:.unshift(File.dirname(__FILE__) + '/../../lib')
|
5
5
|
require 'calculator'
|
6
6
|
|
7
7
|
Before do
|
@@ -1,6 +1,5 @@
|
|
1
1
|
# encoding: utf-8
|
2
|
-
$KCODE='u' unless Cucumber::RUBY_1_9
|
3
2
|
require 'spec/expectations'
|
4
|
-
$:.unshift(File.dirname(__FILE__) + '/../../lib') # This line is not needed in your own project
|
5
3
|
require 'cucumber/formatter/unicode'
|
4
|
+
$:.unshift(File.dirname(__FILE__) + '/../../lib')
|
6
5
|
require 'calculadora'
|
@@ -1,7 +1,7 @@
|
|
1
1
|
# encoding: utf-8
|
2
2
|
require 'spec/expectations'
|
3
|
-
$:.unshift(File.dirname(__FILE__) + '/../../lib') # This line is not needed in your own project
|
4
3
|
require 'cucumber/formatter/unicode'
|
4
|
+
$:.unshift(File.dirname(__FILE__) + '/../../lib')
|
5
5
|
require 'calculator'
|
6
6
|
|
7
7
|
Before do
|
@@ -1,7 +1,7 @@
|
|
1
1
|
# encoding: utf-8
|
2
2
|
require 'spec/expectations'
|
3
|
-
$:.unshift(File.dirname(__FILE__) + '/../../lib') # This line is not needed in your own project
|
4
3
|
require 'cucumber/formatter/unicode'
|
4
|
+
$:.unshift(File.dirname(__FILE__) + '/../../lib')
|
5
5
|
require 'kalkulator'
|
6
6
|
|
7
7
|
Before do
|
@@ -1,7 +1,7 @@
|
|
1
1
|
# encoding: utf-8
|
2
2
|
require 'spec/expectations'
|
3
|
-
$:.unshift(File.dirname(__FILE__) + '/../../lib') # This line is not needed in your own project
|
4
3
|
require 'cucumber/formatter/unicode'
|
4
|
+
$:.unshift(File.dirname(__FILE__) + '/../../lib')
|
5
5
|
require 'calculator'
|
6
6
|
|
7
7
|
Before do
|
@@ -1,7 +1,7 @@
|
|
1
1
|
# encoding: utf-8
|
2
|
-
|
3
|
-
$:.unshift(File.dirname(__FILE__) + '/../../lib') # This line is not needed in your own project
|
2
|
+
require 'spec/expectations'
|
4
3
|
require 'cucumber/formatter/unicode'
|
4
|
+
$:.unshift(File.dirname(__FILE__) + '/../../lib')
|
5
5
|
require 'calculator'
|
6
6
|
|
7
7
|
Before do
|
@@ -20,5 +20,5 @@ Kada /pritisnem (\w+)/ do |op|
|
|
20
20
|
end
|
21
21
|
|
22
22
|
Onda /bi trebalo da bude (.*) prikazano na ekranu/ do |result|
|
23
|
-
@result.
|
23
|
+
@result.should == result.to_f
|
24
24
|
end
|
@@ -1,8 +1,4 @@
|
|
1
1
|
# encoding: utf-8
|
2
|
-
# require 'spec/expectations'
|
3
|
-
$:.unshift(File.dirname(__FILE__) + '/../../lib') # This line is not needed in your own project
|
4
|
-
require 'cucumber/formatter/unicode'
|
5
|
-
require 'calculator'
|
6
2
|
|
7
3
|
Before do
|
8
4
|
@calc = Calculator.new
|
@@ -20,5 +16,5 @@ end
|
|
20
16
|
end
|
21
17
|
|
22
18
|
Онда /би требало да буде (.*) прикаѕано на екрану/ do |result|
|
23
|
-
@result.
|
19
|
+
@result.should == result.to_f
|
24
20
|
end
|
@@ -1,7 +1,7 @@
|
|
1
1
|
# encoding: utf-8
|
2
2
|
require 'spec/expectations'
|
3
|
-
$:.unshift(File.dirname(__FILE__) + '/../../lib') # This line is not needed in your own project
|
4
3
|
require 'cucumber/formatter/unicode'
|
4
|
+
$:.unshift(File.dirname(__FILE__) + '/../../lib')
|
5
5
|
require 'hesap_makinesi'
|
6
6
|
|
7
7
|
Before do
|
@@ -1,7 +1,7 @@
|
|
1
1
|
# encoding: utf-8
|
2
2
|
require 'spec/expectations'
|
3
|
-
$:.unshift(File.dirname(__FILE__) + '/../../lib') # This line is not needed in your own project
|
4
3
|
require 'cucumber/formatter/unicode'
|
4
|
+
$:.unshift(File.dirname(__FILE__) + '/../../lib')
|
5
5
|
require 'calculator'
|
6
6
|
|
7
7
|
Before do
|
@@ -1,7 +1,7 @@
|
|
1
1
|
# encoding: utf-8
|
2
2
|
require 'spec/expectations'
|
3
|
-
$:.unshift(File.dirname(__FILE__) + '/../../lib') # This line is not needed in your own project
|
4
3
|
require 'cucumber/formatter/unicode'
|
4
|
+
$:.unshift(File.dirname(__FILE__) + '/../../lib')
|
5
5
|
require 'calculator'
|
6
6
|
|
7
7
|
Before do
|
@@ -1,44 +1,47 @@
|
|
1
1
|
# This is an example of how you can set up screenshots for your
|
2
2
|
# browser testing. Just run cucumber with --format html --out report.html
|
3
3
|
#
|
4
|
-
#
|
5
|
-
#
|
6
|
-
#
|
4
|
+
# The code below will work on OS X or Windows (with IE Watir only).
|
5
|
+
# Adding support for other platforms should be easy - as long as there is a
|
6
|
+
# ruby library or command line tool to take pictures.
|
7
|
+
#
|
7
8
|
module Screenshots
|
8
|
-
def add_screenshot
|
9
|
-
id = "screenshot-#{Time.new.to_i}"
|
10
|
-
take_screenshot(id)
|
11
|
-
embed("#{id}.png", "image/png")
|
12
|
-
end
|
13
|
-
|
14
9
|
if Cucumber::OS_X
|
15
|
-
def
|
10
|
+
def embed_screenshot(id)
|
16
11
|
`screencapture -t png #{id}.png`
|
12
|
+
embed("#{id}.png", "image/png")
|
13
|
+
end
|
14
|
+
elsif Cucumber::WINDOWS
|
15
|
+
# http://wtr.rubyforge.org/rdoc/classes/Watir/ScreenCapture.html
|
16
|
+
require 'watir/screen_capture'
|
17
|
+
include Watir::ScreenCapture
|
18
|
+
def embed_screenshot(id)
|
19
|
+
screen_capture("#{id}.jpg", true)
|
20
|
+
embed("#{id}.jpg", "image/jpeg")
|
17
21
|
end
|
18
22
|
else
|
19
23
|
# Other platforms...
|
20
|
-
def
|
24
|
+
def embed_screenshot(id)
|
21
25
|
STDERR.puts "Sorry - no screenshots on your platform yet."
|
22
26
|
end
|
23
27
|
end
|
24
28
|
end
|
29
|
+
World(Screenshots)
|
25
30
|
|
26
31
|
After do
|
27
|
-
|
32
|
+
embed_screenshot("screenshot-#{Time.new.to_i}")
|
28
33
|
end
|
29
34
|
|
30
|
-
# Other variants
|
35
|
+
# Other variants:
|
31
36
|
#
|
32
37
|
# Only take screenshot on failures
|
33
38
|
#
|
34
39
|
# After do |scenario|
|
35
|
-
#
|
40
|
+
# embed_screenshot("screenshot-#{Time.new.to_i}") if scenario.failed?
|
36
41
|
# end
|
37
42
|
#
|
38
43
|
# Only take screenshot for scenarios or features tagged @screenshot
|
39
44
|
#
|
40
45
|
# After(@screenshot) do
|
41
|
-
#
|
46
|
+
# embed_screenshot("screenshot-#{Time.new.to_i}")
|
42
47
|
# end
|
43
|
-
|
44
|
-
World(Screenshots)
|
@@ -78,6 +78,7 @@ Feature: http://gist.github.com/221223
|
|
78
78
|
|
79
79
|
"""
|
80
80
|
|
81
|
+
@fails_on_1_9
|
81
82
|
Scenario: Call multiline string
|
82
83
|
When I run cucumber features/f.feature:10
|
83
84
|
Then STDERR should be empty
|
@@ -101,6 +102,7 @@ Feature: http://gist.github.com/221223
|
|
101
102
|
|
102
103
|
"""
|
103
104
|
|
105
|
+
@fails_on_1_9
|
104
106
|
Scenario: Call table
|
105
107
|
When I run cucumber features/f.feature:13
|
106
108
|
Then STDERR should be empty
|
@@ -556,6 +556,7 @@ Feature: Cucumber command line
|
|
556
556
|
|
557
557
|
Scenario: Run with limited tag count, blowing it via feature inheritance
|
558
558
|
When I run cucumber -q features/tags_sample.feature --no-source --dry-run --tags @sample_one:1
|
559
|
+
Then STDERR should be empty
|
559
560
|
Then it should fail with
|
560
561
|
"""
|
561
562
|
@sample_one
|
@@ -617,14 +618,16 @@ Feature: Cucumber command line
|
|
617
618
|
|
618
619
|
"""
|
619
620
|
|
621
|
+
# Fails on 1.9 because of encoding issues.
|
622
|
+
@fails_on_1_9
|
620
623
|
Scenario: Generate PDF with pdf formatter
|
621
|
-
|
622
|
-
|
623
|
-
|
624
|
+
When I run cucumber --format pdf --out tmp/sample.pdf --dry-run features/sample.feature
|
625
|
+
Then STDERR should be empty
|
626
|
+
Then "examples/self_test/tmp/sample.pdf" should match "Pages 2"
|
624
627
|
|
625
628
|
Scenario: Run feature elements which match a name using -n
|
626
629
|
When I run cucumber -n Pisang -q features/
|
627
|
-
|
630
|
+
Then it should pass with
|
628
631
|
"""
|
629
632
|
Feature: search examples
|
630
633
|
|
@@ -336,11 +336,11 @@ features/failing_expectation.feature:4:in `Given failing expectation':in `Given
|
|
336
336
|
pending # express the regexp above with the code you wish you had
|
337
337
|
end</pre></li> <script type="text/javascript">moveProgressBar('39.6');</script><script>makeYellow('scenario_20');</script><li id='features_lots_of_undefined_feature_5' class='step undefined'><div><span class="keyword">Given</span> <span class="step val">it's 40 degrees in Norway</span></div><pre>Given /^it's 40 degrees in Norway$/ do
|
338
338
|
pending # express the regexp above with the code you wish you had
|
339
|
-
end</pre></li> <script type="text/javascript">moveProgressBar('40.2');</script><script>makeYellow('scenario_20');</script><li id='features_lots_of_undefined_feature_6' class='step undefined'><div><span class="keyword">And</span> <span class="step val">it's 40 degrees in Norway</span></div><pre>
|
339
|
+
end</pre></li> <script type="text/javascript">moveProgressBar('40.2');</script><script>makeYellow('scenario_20');</script><li id='features_lots_of_undefined_feature_6' class='step undefined'><div><span class="keyword">And</span> <span class="step val">it's 40 degrees in Norway</span></div><pre>Given /^it's 40 degrees in Norway$/ do
|
340
340
|
pending # express the regexp above with the code you wish you had
|
341
341
|
end</pre></li> <script type="text/javascript">moveProgressBar('40.8');</script><script>makeYellow('scenario_20');</script><li id='features_lots_of_undefined_feature_7' class='step undefined'><div><span class="keyword">When</span> <span class="step val">I stop procrastinating</span></div><pre>When /^I stop procrastinating$/ do
|
342
342
|
pending # express the regexp above with the code you wish you had
|
343
|
-
end</pre></li> <script type="text/javascript">moveProgressBar('41.4');</script><script>makeYellow('scenario_20');</script><li id='features_lots_of_undefined_feature_8' class='step undefined'><div><span class="keyword">And</span> <span class="step val">there is world peace</span></div><pre>
|
343
|
+
end</pre></li> <script type="text/javascript">moveProgressBar('41.4');</script><script>makeYellow('scenario_20');</script><li id='features_lots_of_undefined_feature_8' class='step undefined'><div><span class="keyword">And</span> <span class="step val">there is world peace</span></div><pre>When /^there is world peace$/ do
|
344
344
|
pending # express the regexp above with the code you wish you had
|
345
345
|
end</pre></li> <script type="text/javascript">moveProgressBar('42.0');</script></ol></div></div><div class="feature"><h2><span class="val">Feature: multiline</span></h2><p class="narrative"></p><div class="background"><h3><span class="keyword">Background:</span> <span class="val">I'm a multiline name
|
346
346
|
which goes on and on and on for three lines
|
@@ -1,3 +1,4 @@
|
|
1
|
+
# encoding: utf-8
|
1
2
|
require 'tempfile'
|
2
3
|
|
3
4
|
Given /^I am in (.*)$/ do |example_dir_relative_path|
|
@@ -66,8 +67,8 @@ Then /^it should (fail|pass)$/ do |success|
|
|
66
67
|
end
|
67
68
|
|
68
69
|
Then /^it should (fail|pass) with$/ do |success, output|
|
69
|
-
Then("it should #{success}")
|
70
70
|
last_stdout.should == output
|
71
|
+
Then("it should #{success}")
|
71
72
|
end
|
72
73
|
|
73
74
|
Then /^the output should contain$/ do |text|
|
@@ -82,7 +83,6 @@ Then /^the output should be$/ do |text|
|
|
82
83
|
last_stdout.should == text
|
83
84
|
end
|
84
85
|
|
85
|
-
|
86
86
|
Then /^"([^\"]*)" should contain$/ do |file, text|
|
87
87
|
strip_duration(IO.read(file)).should == text
|
88
88
|
end
|
@@ -95,7 +95,7 @@ Then /^"([^\"]*)" with junit duration "([^\"]*)" should contain$/ do |actual_fil
|
|
95
95
|
end
|
96
96
|
|
97
97
|
Then /^"([^\"]*)" should match "([^\"]*)"$/ do |file, text|
|
98
|
-
|
98
|
+
File.open(file, Cucumber.file_mode('r')).read.should =~ Regexp.new(text)
|
99
99
|
end
|
100
100
|
|
101
101
|
Then /^"([^\"]*)" should have the same contents as "([^\"]*)"$/ do |actual_file, expected_file|
|
data/features/support/env.rb
CHANGED
@@ -3,11 +3,7 @@ require 'tempfile'
|
|
3
3
|
require 'spec/expectations'
|
4
4
|
require 'fileutils'
|
5
5
|
require 'forwardable'
|
6
|
-
|
7
|
-
require 'spork'
|
8
|
-
rescue Gem::LoadError => ex
|
9
|
-
gem 'spork', '>= 0.7.3' # Ensure correct spork version number to avoid false-negatives.
|
10
|
-
end
|
6
|
+
require 'cucumber/formatter/unicode'
|
11
7
|
|
12
8
|
class CucumberWorld
|
13
9
|
extend Forwardable
|
@@ -99,6 +95,12 @@ class CucumberWorld
|
|
99
95
|
end
|
100
96
|
|
101
97
|
def run_spork_in_background(port = nil)
|
98
|
+
begin
|
99
|
+
require 'spork'
|
100
|
+
rescue Gem::LoadError => ex
|
101
|
+
gem 'spork', '>= 0.7.3' # Ensure correct spork version number to avoid false-negatives.
|
102
|
+
end
|
103
|
+
|
102
104
|
pid = fork
|
103
105
|
in_current_dir do
|
104
106
|
if pid
|
data/features/tag_logic.feature
CHANGED
@@ -26,7 +26,7 @@ Feature: Tag logic
|
|
26
26
|
"""
|
27
27
|
|
28
28
|
Scenario: ANDing tags
|
29
|
-
When I run cucumber -q -t @one
|
29
|
+
When I run cucumber -q -t @one -t @three features/tagulicious.feature
|
30
30
|
Then it should pass
|
31
31
|
And the output should contain
|
32
32
|
"""
|
@@ -42,7 +42,7 @@ Feature: Tag logic
|
|
42
42
|
"""
|
43
43
|
|
44
44
|
Scenario: ORing tags
|
45
|
-
When I run cucumber -q -t @one
|
45
|
+
When I run cucumber -q -t @one,@three features/tagulicious.feature
|
46
46
|
Then it should pass
|
47
47
|
And the output should contain
|
48
48
|
"""
|
@@ -68,7 +68,7 @@ Feature: Tag logic
|
|
68
68
|
Scenario: Before hooks ORing
|
69
69
|
Given a file named "features/support/hooks.rb" with:
|
70
70
|
"""
|
71
|
-
Before('@one
|
71
|
+
Before('@one,@three') do
|
72
72
|
raise 'boom'
|
73
73
|
end
|
74
74
|
"""
|
@@ -111,7 +111,7 @@ Feature: Tag logic
|
|
111
111
|
Scenario: Before hooks ANDing
|
112
112
|
Given a file named "features/support/hooks.rb" with:
|
113
113
|
"""
|
114
|
-
Before('@one
|
114
|
+
Before('@one','@three') do
|
115
115
|
raise 'boom'
|
116
116
|
end
|
117
117
|
"""
|
@@ -148,7 +148,7 @@ Feature: Tag logic
|
|
148
148
|
Scenario: Before hooks ANDing with a bad hook matching nothing
|
149
149
|
Given a file named "features/support/hooks.rb" with:
|
150
150
|
"""
|
151
|
-
Before('@one
|
151
|
+
Before('@one','@notused') do
|
152
152
|
raise 'boom'
|
153
153
|
end
|
154
154
|
"""
|
@@ -180,7 +180,7 @@ Feature: Tag logic
|
|
180
180
|
Scenario: After hooks ORing
|
181
181
|
Given a file named "features/support/hooks.rb" with:
|
182
182
|
"""
|
183
|
-
After('@one
|
183
|
+
After('@one,@three') do
|
184
184
|
raise 'boom'
|
185
185
|
end
|
186
186
|
"""
|
@@ -223,7 +223,7 @@ Feature: Tag logic
|
|
223
223
|
Scenario: After hooks ANDing
|
224
224
|
Given a file named "features/support/hooks.rb" with:
|
225
225
|
"""
|
226
|
-
After('@one
|
226
|
+
After('@one','@three') do
|
227
227
|
raise 'boom'
|
228
228
|
end
|
229
229
|
"""
|
@@ -24,7 +24,7 @@ Feature: Wire Protocol
|
|
24
24
|
#
|
25
25
|
# Every message supports two standard responses:
|
26
26
|
# * success : which expects different arguments (sometimes none at
|
27
|
-
# depending on the request.
|
27
|
+
# all) depending on the request.
|
28
28
|
# * fail : causes a Cucumber::WireSupport::WireException to be
|
29
29
|
# raised.
|
30
30
|
#
|
data/gem_tasks/features.rake
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
require 'autotest'
|
2
2
|
require 'tempfile'
|
3
|
-
require 'yaml'
|
4
3
|
require 'cucumber'
|
4
|
+
require 'cucumber/cli/profile_loader'
|
5
5
|
|
6
6
|
module Autotest::CucumberMixin
|
7
7
|
def self.included(receiver)
|
@@ -104,10 +104,10 @@ module Autotest::CucumberMixin
|
|
104
104
|
def make_cucumber_cmd(features_to_run, dirty_features_filename)
|
105
105
|
return '' if features_to_run == ''
|
106
106
|
|
107
|
-
|
107
|
+
profile_loader = Cucumber::Cli::ProfileLoader.new
|
108
108
|
|
109
|
-
profile ||= "autotest-all" if
|
110
|
-
profile ||= "autotest" if
|
109
|
+
profile ||= "autotest-all" if profile_loader.has_profile?("autotest-all") && features_to_run == :all
|
110
|
+
profile ||= "autotest" if profile_loader.has_profile?("autotest")
|
111
111
|
profile ||= nil
|
112
112
|
|
113
113
|
if profile
|