Skip to content


Subversion checkout URL

You can clone with
Download ZIP
Fetching contributors…
Cannot retrieve contributors at this time
138 lines (105 sloc) 5.55 KB
== 0.1.8 2008-10-18
This release extends the support for tables. PLEASE NOTE THAT TABLES ARE STILL EXPERIMENTAL.
In previous releases it has been possible to use tables to define "more examples" of a scenario i
n a FIT-style column fixture kind of way. Now you can also use tables as arguments to steps.
Tables used to define more examples after a scenario must now be prefixed. In English it looks like this:
Feature: Addition
In order to avoid silly mistakes
As a math idiot
I want to be told the sum of two numbers
Scenario: Add two numbers
Given I have entered 50 into the calculator
And I have entered 70 into the calculator
When I press add
Then the result should be 120 on the screen
And the result class should be Fixnum
More Examples:
| input_1 | input_2 | button | output | class |
| 20 | 30 | add | 50 | Fixnum |
| 2 | 5 | add | 7 | Fixnum |
| 0 | 40 | add | 40 | Fixnum |
Languages that are not updated yet will have to use "More Examples" until we get the translations.
Tables can also be used as arguments to individual steps. In fact, steps now support a single argument
that can span several lines. This can be a table or a string.
Given the following people exist:
| name | email | phone |
| Aslak | | 123 |
| Joe | | 234 |
| Bryan | | 234 |
When I search for
Then I should see:
| name | email | phone |
| Aslak | | 123 |
| Joe | | 234 |
And I should see:
"Some text
on several lines"
The step definitions for such multiline steps must define an extra block argument for the argument:
Given /the following people exist:/ do |people_table|
# people_table is of type Cucumber::Model::Table
# See RDoc for more info
Then /I should see:/ do |string|
# string is a plain old ruby String with leading spaces on each line removed
=== New features
* Added profile formatter. (#35, Joseph Wilk)
* Added support for Chinese Simplified. (Liming Lian)
* Added support for Dutch. (Sjoerd Tieleman)
* Multiline steps are now supported. (#4, Aslak Hellesøy)
* Tables used to define more examples for a scenario must be prefixed "More Examples" (see languages.yml for other languages)
* Show the file and line number for scenarios as a comment when displaying with the pretty formatter. (#40, Joseph Wilk)
* Show the file for the feature as a comment when displaying with the pretty formatter. (#40, Joseph Wilk)
* Show the feature file and line for pending steps as a comment when displaying with the pretty formatter. (#40, Joseph Wilk)
=== Bugfixes
* Fixed speling errors in Spanish (Daniel Cadenas)
* ActionMailer delivery_method should not be set to test (#41, Luke Melia)
* Reverse incorrectly ordered args in webrat select step (#43, David Chelimsky)
* Support comments above the first scenario (#31, Aslak Hellesøy)
* Fixed the HTML Formatter to use actual values for FIT table headers (#30, Joseph Wilk)
=== Removed features
* Removed the /^I go to (.*)$/ step from common_webrat.rb - it's not language agnostic and provides little value.
=== New features
* Added new --out option to make it easier to specify output from Rake and cucumber.yml
== 0.1.7
This release fixes a few bugs and adds some new features. The most notable features are:
=== Calling steps from steps
Step definitions are a little bit closer to having regular method semantics.
You define them, but now you can also call them from other steps. Here is an
Given /I am logged in as an (.*) named (.*)$/ do |role, name|
Given "I am registered as #{role}, #{name}, secret"
When "I log in with #{name}, secret"
Given /I am registered as (.*), (.*), (.*)/ do |role, name, password|
# (Code removed for brevity)
When /I log in with (.*), (.*)/ do |name, password|
# (Code removed for brevity)
This means that steps can be reused in other steps. The GivenScenario feature achieves a similar
effect (on the scenario level), but this feature is something we're not very happy with, mostly
because it's not parameterisable. Calling steps from steps is.
GivenScenario will still be working several releases, but the plan is to remove it completely in
the 0.3.0 release.
=== Seeing where a step is defined
Prior to this release it could be hard to find out where the ruby step definition matching
a plain text step is defined. Not anymore! Cucumber will now output this:
Scenario: Regular numbers
Given I have entered 3 into the calculator # features/steps/calculator_steps.rb:12
And I have entered 2 into the calculator # features/steps/calculator_steps.rb:12
When I press divide # features/steps/calculator_steps.rb:16
Then the result should be 1.5 on the screen # features/steps/calculator_steps.rb:20
And the result class should be Float # features/steps/calculator_steps.rb:24
=== Bugfixes
* Fixed a bug in the command line args being lost when using --profile (#27, Joseph Wilk)
* Fixed a bug in Webrat selects (Tim Glen)
* Fixed parsing of DOS line endings (#2, #28, Aslak Hellesøy)
=== New features
* Steps can be called from other steps (#3, Bryan Helmkamp, Aslak Hellesøy)
* Added But keyword to all languages (#21, Aslak Hellesøy)
* Added --no-source option to display step definition location next to step text (#26, Joseph Wilk, Aslak Hellesøy)
* Added more Webrat steps (#25, Tim Glen)
== 0.1.6
First gem release!
Jump to Line
Something went wrong with that request. Please try again.