cucumber 0.5.3 → 0.6.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (91) hide show
  1. data/History.txt +25 -0
  2. data/Rakefile +4 -3
  3. data/VERSION.yml +3 -2
  4. data/cucumber.gemspec +21 -16
  5. data/cucumber.yml +5 -3
  6. data/examples/i18n/ar/features/step_definitons/calculator_steps.rb +1 -1
  7. data/examples/i18n/bg/features/support/env.rb +1 -2
  8. data/examples/i18n/cat/features/step_definitons/calculator_steps.rb +1 -1
  9. data/examples/i18n/da/features/step_definitons/lommeregner_steps.rb +1 -1
  10. data/examples/i18n/de/features/step_definitons/calculator_steps.rb +1 -1
  11. data/examples/i18n/en-lol/features/support/env.rb +0 -1
  12. data/examples/i18n/en/features/step_definitons/calculator_steps.rb +2 -2
  13. data/examples/i18n/es/features/step_definitons/calculador_steps.rb +2 -2
  14. data/examples/i18n/et/features/step_definitions/kalkulaator_steps.rb +1 -1
  15. data/examples/i18n/fi/features/step_definitons/laskin_steps.rb +1 -1
  16. data/examples/i18n/fr/features/step_definitions/calculatrice_steps.rb +0 -6
  17. data/examples/i18n/fr/features/support/env.rb +5 -0
  18. data/examples/i18n/he/features/step_definitons/calculator_steps.rb +1 -1
  19. data/examples/i18n/he/lib/calculator.rb +1 -0
  20. data/examples/i18n/hu/features/step_definitons/calculator_steps.rb +1 -1
  21. data/examples/i18n/id/features/step_definitons/calculator_steps.rb +1 -1
  22. data/examples/i18n/it/features/step_definitons/calcolatrice_steps.rb +1 -1
  23. data/examples/i18n/ja/features/step_definitons/calculator_steps.rb +0 -5
  24. data/examples/i18n/ja/features/support/env.rb +5 -0
  25. data/examples/i18n/ko/features/step_definitons/calculator_steps.rb +1 -1
  26. data/examples/i18n/lt/features/step_definitons/calculator_steps.rb +1 -1
  27. data/examples/i18n/lv/features/step_definitons/calculator_steps.rb +1 -1
  28. data/examples/i18n/no/features/support/env.rb +1 -2
  29. data/examples/i18n/pl/features/step_definitons/calculator_steps.rb +1 -1
  30. data/examples/i18n/pl/features/support/env.rb +1 -2
  31. data/examples/i18n/pt/features/support/env.rb +1 -2
  32. data/examples/i18n/ro/features/step_definitons/calculator_steps.rb +1 -1
  33. data/examples/i18n/ru/features/support/env.rb +1 -2
  34. data/examples/i18n/se/features/step_definitons/kalkulator_steps.rb +1 -1
  35. data/examples/i18n/sk/features/step_definitons/calculator_steps.rb +1 -1
  36. data/examples/i18n/sr-latn/features/step_definitons/calculator_steps.rb +3 -3
  37. data/examples/i18n/sr/features/step_definitons/calculator_steps.rb +1 -5
  38. data/examples/i18n/sr/features/support/env.rb +5 -0
  39. data/examples/i18n/tr/features/step_definitons/hesap_makinesi_adimlari.rb +1 -1
  40. data/examples/i18n/uz/features/support/env.rb +1 -2
  41. data/examples/i18n/zh-CN/features/step_definitons/calculator_steps.rb +1 -1
  42. data/examples/i18n/zh-TW/features/step_definitons/calculator_steps.rb +1 -1
  43. data/examples/self_test/features/step_definitions/sample_steps.rb +2 -0
  44. data/examples/watir/features/support/screenshots.rb +20 -17
  45. data/features/call_many_steps.feature +2 -0
  46. data/features/cucumber_cli.feature +7 -4
  47. data/features/html_formatter.feature +1 -0
  48. data/features/html_formatter/a.html +2 -2
  49. data/features/language_help.feature +1 -0
  50. data/features/step_definitions/cucumber_steps.rb +3 -3
  51. data/features/support/env.rb +7 -5
  52. data/features/tag_logic.feature +7 -7
  53. data/features/wire_protocol.feature +1 -1
  54. data/gem_tasks/features.rake +2 -0
  55. data/lib/autotest/cucumber_mixin.rb +4 -4
  56. data/lib/cucumber/ast.rb +0 -1
  57. data/lib/cucumber/ast/feature.rb +9 -12
  58. data/lib/cucumber/ast/feature_element.rb +4 -4
  59. data/lib/cucumber/ast/features.rb +2 -2
  60. data/lib/cucumber/ast/table.rb +1 -0
  61. data/lib/cucumber/ast/tags.rb +1 -97
  62. data/lib/cucumber/cli/configuration.rb +3 -1
  63. data/lib/cucumber/cli/main.rb +20 -23
  64. data/lib/cucumber/cli/options.rb +9 -18
  65. data/lib/cucumber/filter.rb +4 -2
  66. data/lib/cucumber/formatter/console.rb +8 -28
  67. data/lib/cucumber/formatter/html.rb +1 -1
  68. data/lib/cucumber/formatter/pdf.rb +0 -4
  69. data/lib/cucumber/formatter/pretty.rb +1 -2
  70. data/lib/cucumber/formatter/progress.rb +1 -5
  71. data/lib/cucumber/formatter/rerun.rb +2 -0
  72. data/lib/cucumber/formatter/unicode.rb +6 -6
  73. data/lib/cucumber/language_support/language_methods.rb +0 -1
  74. data/lib/cucumber/parser/common.rb +16 -4
  75. data/lib/cucumber/parser/feature.rb +92 -27
  76. data/lib/cucumber/parser/feature.tt +8 -6
  77. data/lib/cucumber/parser/py_string.rb +12 -3
  78. data/lib/cucumber/parser/table.rb +12 -3
  79. data/lib/cucumber/rb_support/rb_dsl.rb +6 -6
  80. data/lib/cucumber/rb_support/rb_hook.rb +4 -5
  81. data/lib/cucumber/rb_support/rb_language.rb +1 -1
  82. data/lib/cucumber/tag_expression.rb +41 -0
  83. data/spec/cucumber/ast/feature_spec.rb +23 -2
  84. data/spec/cucumber/ast/scenario_outline_spec.rb +0 -7
  85. data/spec/cucumber/cli/options_spec.rb +3 -3
  86. data/spec/cucumber/formatter/html_spec.rb +10 -0
  87. data/spec/cucumber/formatter/spec_helper.rb +2 -1
  88. data/spec/cucumber/tag_expression_spec.rb +127 -0
  89. metadata +15 -10
  90. data/spec/cucumber/ast/tags_spec.rb +0 -29
  91. 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
2
  require 'spec/expectations'
3
- $:.unshift(File.dirname(__FILE__) + '/../../lib')
4
3
  require 'cucumber/formatter/unicode'
4
+ $:.unshift(File.dirname(__FILE__) + '/../../lib')
5
5
  require 'calculator'
6
- $KCODE='u' unless Cucumber::RUBY_1_9
@@ -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,6 +1,5 @@
1
1
  # encoding: utf-8
2
2
  require 'spec/expectations'
3
- $:.unshift(File.dirname(__FILE__) + '/../../lib')
4
3
  require 'cucumber/formatter/unicode'
4
+ $:.unshift(File.dirname(__FILE__) + '/../../lib')
5
5
  require 'calculator'
6
- $KCODE='u' unless Cucumber::RUBY_1_9
@@ -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
- # require 'spec/expectations'
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.to_f == result.to_f
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.to_f == result.to_f
19
+ @result.should == result.to_f
24
20
  end
@@ -0,0 +1,5 @@
1
+ # encoding: utf-8
2
+ require 'spec/expectations'
3
+ require 'cucumber/formatter/unicode'
4
+ $:.unshift(File.dirname(__FILE__) + '/../../lib')
5
+ require 'calculator'
@@ -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,6 +1,5 @@
1
1
  # encoding: utf-8
2
2
  require 'spec/expectations'
3
- $:.unshift(File.dirname(__FILE__) + '/../../lib')
4
3
  require 'cucumber/formatter/unicode'
4
+ $:.unshift(File.dirname(__FILE__) + '/../../lib')
5
5
  require 'calculator'
6
- $KCODE='u' unless Cucumber::RUBY_1_9
@@ -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
@@ -69,6 +69,8 @@ end
69
69
  Given /^another unused$/ do
70
70
  end
71
71
 
72
+ require 'fileutils'
73
+
72
74
  after_file = File.expand_path(File.dirname(__FILE__) + '/../../tmp/after.txt')
73
75
 
74
76
  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
- # This examples currently only works on OS X, but adding support for other
5
- # platform should be easy - as long as there is a command line tool to take
6
- # a picture of the desktop.
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 take_screenshot(id)
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 take_screenshot(id)
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
- add_screenshot
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
- # add_screenshot if scenario.failed?
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
- # add_screenshot
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
- When I run cucumber --format pdf --out tmp/sample.pdf --dry-run features/sample.feature
622
- Then STDERR should be empty
623
- Then "examples/self_test/tmp/sample.pdf" should match "Pages 2"
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
- Then it should pass with
630
+ Then it should pass with
628
631
  """
629
632
  Feature: search examples
630
633
 
@@ -1,3 +1,4 @@
1
+ @fails_on_1_9
1
2
  Feature: HTML formatter
2
3
  In order to make it easy to read Cucumber results
3
4
  there should be a HTML formatter with an awesome CSS
@@ -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>And /^it's 40 degrees in Norway$/ do
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>And /^there is world peace$/ do
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
+ @needs-many-fonts
1
2
  Feature: Language help
2
3
  In order to figure out the keywords to use for a language
3
4
  I want to be able to get help on the language from the CLI
@@ -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
- IO.read(file).should =~ Regexp.new(text)
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|
@@ -3,11 +3,7 @@ require 'tempfile'
3
3
  require 'spec/expectations'
4
4
  require 'fileutils'
5
5
  require 'forwardable'
6
- begin
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
@@ -26,7 +26,7 @@ Feature: Tag logic
26
26
  """
27
27
 
28
28
  Scenario: ANDing tags
29
- When I run cucumber -q -t @one,@three features/tagulicious.feature
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 -t @three features/tagulicious.feature
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', '@three') do
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,@three') do
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,@notused') do
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', '@three') do
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,@three') do
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
  #
@@ -9,6 +9,8 @@ Cucumber::Rake::Task.new do |t|
9
9
  t.profile = 'jruby'
10
10
  elsif(Cucumber::WINDOWS_MRI)
11
11
  t.profile = 'windows_mri'
12
+ elsif(Cucumber::RUBY_1_9)
13
+ t.profile = 'ruby_1_9'
12
14
  end
13
15
  t.rcov = ENV['RCOV']
14
16
  end
@@ -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
- profiles = YAML.load_file("cucumber.yml").keys rescue []
107
+ profile_loader = Cucumber::Cli::ProfileLoader.new
108
108
 
109
- profile ||= "autotest-all" if profiles.include?("autotest-all") and features_to_run == :all
110
- profile ||= "autotest" if profiles.include?("autotest")
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