josephwilk (owner)

Fork Of

Revisions

gist: 59938 Download_button fork
public
Public Clone URL: git://gist.github.com/59938.git
Embed All Files: show embed
Text only #
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
# trying out the scenario outlines cucumber feature
 
$ gem list cucumber; gem list webrat
*** LOCAL GEMS ***
cucumber (0.1.16)
webrat (0.4.1)
 
# the feature we are trying features/manage_cukes.feature
Feature: Manage cukes
  In order to use scenario outlines
  everything should work
 
  Scenario Outline: Testing scenario outlines
    Given there are <cuke_versions>
    Examples:
      |cuke_versions |
      |cuke_version 1|
      |cuke_version 2|
      |cuke_version 3|
      |cuke_version 4|
 
# and step features/step_definitions/cuke_steps.rb
Given /^there are <cuke_versions>$/ do
  cuke_version.should_not be_nil
end
 
Q 1. Is the wiki http://wiki.github.com/aslakhellesoy/cucumber/scenario-outlines not accurate?
 
$ cucumber features/manage_cukes.feature
  Scenario Outline: Testing scenario outlines # features/manage_cukes.feature:5
    Given there are <cuke_versions> # features/manage_cukes.feature:6
    |cuke_versions |
    |cuke_version 1|
    |cuke_version 2|
    |cuke_version 3|
    |cuke_version 4|
 
5 scenarios
4 steps pending (4 with no step definition)
 
A 1: lets solve it changing Example by More Examples in feature
 
Q 2. Are we receiving the data in step?
 
$ cucumber features/manage_cukes.feature
 
Feature: Manage cukes # features/manage_cukes.feature
  In order to use scenario outlines
  everything should work
  Scenario Outline: Testing scenario outlines # features/manage_cukes.feature:5
    Given there are <cuke_versions> # features/manage_cukes.feature:6
 
    |cuke_versions |
    |
 
      undefined method `cuke_version' for #<ActionController::Integration::Session:0xb7126abc> (NoMethodError)
      /usr/lib/ruby/gems/1.8/gems/actionpack-2.2.2/lib/action_controller/test_process.rb:471:in `method_missing'
      /usr/lib/ruby/gems/1.8/gems/actionpack-2.2.2/lib/action_controller/integration.rb:498:in `__send__'
      /usr/lib/ruby/gems/1.8/gems/actionpack-2.2.2/lib/action_controller/integration.rb:498:in `method_missing'
      ./features/step_definitions/cuke_steps.rb:2:in ` /^there are <cuke_versions>$/'
      features/manage_cukes.feature:9:in `/^there are <cuke_versions>$/'
    |
 
      undefined method `cuke_version' for #<ActionController::Integration::Session:0xb711cb48> (NoMethodError)
      /usr/lib/ruby/gems/1.8/gems/actionpack-2.2.2/lib/action_controller/test_process.rb:471:in `method_missing'
      /usr/lib/ruby/gems/1.8/gems/actionpack-2.2.2/lib/action_controller/integration.rb:498:in `__send__'
      /usr/lib/ruby/gems/1.8/gems/actionpack-2.2.2/lib/action_controller/integration.rb:498:in `method_missing'
      ./features/step_definitions/cuke_steps.rb:2:in ` /^there are <cuke_versions>$/'
      features/manage_cukes.feature:10:in `/^there are <cuke_versions>$/'
    |
 
      undefined method `cuke_version' for #<ActionController::Integration::Session:0xb70e4ff4> (NoMethodError)
      /usr/lib/ruby/gems/1.8/gems/actionpack-2.2.2/lib/action_controller/test_process.rb:471:in `method_missing'
      /usr/lib/ruby/gems/1.8/gems/actionpack-2.2.2/lib/action_controller/integration.rb:498:in `__send__'
      /usr/lib/ruby/gems/1.8/gems/actionpack-2.2.2/lib/action_controller/integration.rb:498:in `method_missing'
      ./features/step_definitions/cuke_steps.rb:2:in ` /^there are <cuke_versions>$/'
      features/manage_cukes.feature:11:in `/^there are <cuke_versions>$/'
    |
 
      undefined method `cuke_version' for #<ActionController::Integration::Session:0xb70bc770> (NoMethodError)
      /usr/lib/ruby/gems/1.8/gems/actionpack-2.2.2/lib/action_controller/test_process.rb:471:in `method_missing'
      /usr/lib/ruby/gems/1.8/gems/actionpack-2.2.2/lib/action_controller/integration.rb:498:in `__send__'
      /usr/lib/ruby/gems/1.8/gems/actionpack-2.2.2/lib/action_controller/integration.rb:498:in `method_missing'
      ./features/step_definitions/cuke_steps.rb:2:in ` /^there are <cuke_versions>$/'
      features/manage_cukes.feature:12:in `/^there are <cuke_versions>$/'
 
5 scenarios
4 steps failed
 
A 2? lets upgrade cucumber (webrat is at its lattest version)
 
$ gem list cucumber
cucumber (0.1.99.21)
 
 $ cucumber features/manage_cukes.feature
/usr/lib/ruby/gems/1.8/gems/activesupport-2.2.2/lib/active_support/dependencies.rb:442:in `load_missing_constant': uninitialized constant Spec::Runner (NameError)
from /usr/lib/ruby/gems/1.8/gems/activesupport-2.2.2/lib/active_support/dependencies.rb:77:in `const_missing'
from /usr/lib/ruby/gems/1.8/gems/webrat-0.4.1/lib/webrat/rspec-rails.rb:8
from /usr/local/lib/site_ruby/1.8/rubygems/custom_require.rb:31:in `gem_original_require'
from /usr/local/lib/site_ruby/1.8/rubygems/custom_require.rb:31:in `polyglot_original_require'
from /usr/lib/ruby/gems/1.8/gems/polyglot-0.2.4/lib/polyglot.rb:53:in `require'
from /usr/lib/ruby/gems/1.8/gems/activesupport-2.2.2/lib/active_support/dependencies.rb:155:in `require'
from ./features/support/env.rb:16
from /usr/local/lib/site_ruby/1.8/rubygems/custom_require.rb:31:in `gem_original_require'
from /usr/local/lib/site_ruby/1.8/rubygems/custom_require.rb:31:in `polyglot_original_require'
from /usr/lib/ruby/gems/1.8/gems/polyglot-0.2.4/lib/polyglot.rb:53:in `require'
from /usr/lib/ruby/gems/1.8/gems/cucumber-0.1.99.21/bin/../lib/cucumber/cli/main.rb:60:in `require_files'
from /usr/lib/ruby/gems/1.8/gems/cucumber-0.1.99.21/bin/../lib/cucumber/cli/main.rb:58:in `each'
from /usr/lib/ruby/gems/1.8/gems/cucumber-0.1.99.21/bin/../lib/cucumber/cli/main.rb:58:in `require_files'
from /usr/lib/ruby/gems/1.8/gems/cucumber-0.1.99.21/bin/../lib/cucumber/cli/main.rb:34:in `execute!'
from /usr/lib/ruby/gems/1.8/gems/cucumber-0.1.99.21/bin/../lib/cucumber/cli/main.rb:20:in `execute'
from /usr/lib/ruby/gems/1.8/gems/cucumber-0.1.99.21/bin/cucumber:6
from /usr/bin/cucumber:19:in `load'
from /usr/bin/cucumber:19
 
:-( so, it is now webrat the one that fails. What do you think?