[rspec-users] testing out cucumber scenario outline feature
Joaquin Rivera Padron
joahking at gmail.com
Sat Feb 7 14:25:26 EST 2009
hey thanks joseph,
I tried this out:
$ ruby script/plugin install git://github.com/dchelimsky/rspec.git -r 'tag
$ ruby script/plugin install git://github.com/dchelimsky/rspec-rails.git -r
now Webrat finds correctly rspec-rails. Before it was a system gem and so it
failed, and all my
$ spec spec
were doing fine.
now with Examples as the keyword everything runs fine.
$ cucumber 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>
| cuke_versions |
| cuke_version 1 |
| cuke_version 2 |
| cuke_version 3 |
| cuke_version 4 |
4 undefined steps
You can implement step definitions for missing steps with these snippets:
Given /^there are cuke_version 1$/ do
Given /^there are cuke_version 2$/ do
Given /^there are cuke_version 3$/ do
Given /^there are cuke_version 4$/ do
the thing was I was expecting the step like this:
Given /^there are <cuke_versions>$/ do
and then the step get called 4 times with the right data each time. But the
wiki states "*IMPORTANT: Your step definitions will never have to match a
placeholder. They will need to match the values that will replace the
placeholder*" so its a feature.
Then I must be missing the purpose of it. I'll dive the code and see...
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the rspec-users