![]() | Chap 2: fwiw, output of "cucumber features" omits actual snippets |
|
04 Sep 2009, 19:11
David Jenkins (23 posts) |
when I run “cucumber features” from the command line in the hello directory, I get:
jenko@ubuntudesktop:~/myruby/RSpecBook/hello$ cucumber features
Feature: greeter says hello
In order to start learning RSpec and Cucumber
As a reader of a The RSpec Book
I want a greeter to say Hello
Scenario: greeter says hello # features/greeter_says_hello.feature:5
Given a greeter # features/greeter_says_hello.feature:6
When I send it the greet message # features/greeter_says_hello.feature:7
Then it should say "Hello Cucumber!" # features/greeter_says_hello.feature:8
1 scenario (1 undefined)
3 steps (3 undefined)
0m0.003s
You can implement step definitions for undefined steps with these snippets:
jenko@ubuntudesktop:~/myruby/RSpecBook/hello$
Note: no actual snippets, in contrast with the book which shows these: Given /^a greeter$/ do pending end When /^I send it the greet message$/ do pending end Then /^it should say "([^\"]*)" $/ do |arg1| pending end Config: |
|
08 Sep 2009, 13:22
michael evans (7 posts) |
I am having the same exact problem, does anyone have a solution? |
|
08 Sep 2009, 13:34
michael evans (7 posts) |
David it seems like Cucumber does not know what language you want to use until there is a step_definition file in place. So i just created a file called test.rb with the content of “test” inside the step_definitions folder and that worked fine. |
|
14 Sep 2009, 00:26
Darryl (2 posts) |
I had the same problem and solved it by finding a copy of the file env.rb and made sure it was copied to the cb\support directory. The snippets then displayed. This may introduce another error which you complains about “importenv” being deprecated. I solved that by commenting out importenv in the env.rb file And everything worked fine. D |
|
14 Sep 2009, 22:55
David Chelimsky (206 posts) |
Unfortunately, Cucumber is moving really, really fast. The material on the book is based on cucumber-0.3.11, which is only a few months old. We’ll do our best to have the must up to date information about cucumber when the book goes final. The particular change that caused this was that Cucumber now supports other programming languages, and it determines what language to write the snippets in by looking at files in the support directory. If it finds .rb files you get Ruby snippets. If there is nothing there, you get nothing. There is a ticket about this in lighthouse: https://rspec.lighthouseapp.com/projects/16211/... – so it’s being addressed. |
|
23 Oct 2009, 11:39
David Chelimsky (206 posts) |
This got resolved in Cucumber btw. |
| You must be logged in to comment |

