Skip to content


Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
tag: v0.1.99.3
Fetching contributors…

Cannot retrieve contributors at this time

473 lines (363 sloc) 21.579 kb
== Git (0.2 alpha)
This is a major rewrite of Cucumber's internals. The rewrite was done to address technical
debt and to have a codebase that is easier to evolve and maintain. There are some major
changes to the Gherkin language, so this release is not fully backwards compatible. You
may have to edit your feature files a little. Most importantly, "GivenScenario" and
"More Examples" no longer exist. See the "Removed features" section below for more details
on how to use alternatives.
Since the grammar has changed, there are some new keywords. We have to rely on the community
to provide updated translations. This is much easier than before - just update languages.yml.
There is no static code generation anymore. To list all languages:
cucumber --lang help
And to list the keywords for a particular language:
cucumber --lang en-lol help
So just go ahead and list the language of your choice and send us updated translations.
There are some really awesome new features in this release: Tagging, Autoformatting, automatic
aliasing of keywords in all languages, much better Ruby 1.9 support and improved output
for multiline arguments are some of the highlights.
This version also brings Cucumber even closer to Java. Although it has been possible to
run Cucumber on JRuby since v0.1.11, it has required that step definitions be defined
in Ruby code. This has been a barrier for many Java developers who don't know Ruby.
With this version you can write step definitions in pure Java code! Java step definitions
are implemented simply by subclassing org.jbehave.scenario.steps.Steps. Example:
package super.duper;
public class MyJavaSteps extends Steps {
@Given("I have %count cucumbers in my belly")
public void cucumbersInTheBelly(int count) {
// talk to the Belly class
@Then("I should not be hungry for %n hours")
public void shouldNotBeHungry(int n) {
// Make assertions with JUnit or Hamcrest
The only Ruby code you have to write is a little wiring in your env.rb file:
require 'cucumber/jbehave'
You might be wondering what this brings over just using the whole JBehave tool
standalone. Well, it gives you access to the Gherkin language in your features,
which is a richer DSL than JBehave's language. -Over 20 spoken languages, Tables,
Scenario Outlines, the rich command line, the nice output format and everything
pure Ruby users have been enjoying for a while.
== Bugfixes
* No output for multi-line strings (#71 Aslak Hellesøy)
* Fix cucumber/formatters/unicode flaws on Windows (#145 Michael)
* Autotest-related Bugs: YAML missing (#136 Tobias Pape)
* Overeager "rescue LoadError" hides lots of errors (#137 Jonathan del Strother)
* Pending steps in > steps called from steps (#65 Aslak Hellesøy)
=== New features
* Tagging scenarios and features. Pick the ones to run with --tags (#54 Aslak Hellesøy)
* Make the current scenario available to the steps. (#44 Aslak Hellesøy)
* Step definition snippets contain a 'pending' call (#84 Aslak Hellesøy)
* Call multiline steps from other steps (#144 Aslak Hellesøy)
* Run cucumber with --autoformat DIR to reformat (pretty print) all of your feature files. (Aslak Hellesøy)
* New --strict option exits with an error code if there are undefined or pending steps. (Aslak Hellesøy)
* Given, When, Then are automatically aliased to current language.
Ruby 1.8 doesn't allow non-ascii method names in the source, so unless you're on 1.9
you will have to use Given, When, Then or set up your own aliases. Here is Norwegian:
Cucumber.alias_steps(%w{Naar Saa}) # Når, Så already aliased, but can't be called. (Aslak Hellesøy)
* Run cucumber --language help to see all supported languages. (Aslak Hellesøy)
* Run cucumber --language LANG help to see keywords for a given language. (Aslak Hellesøy)
* Multiline arguments (tables and """ strings) are printed in the output. (Aslak Hellesøy)
* It's no longer necessary to compile the Treetop grammar when adding a new language. Localised parser is generated at runtime. (Aslak Hellesøy)
=== Removed features
* "GivenScenario" is gone. Instead you can call Steps from Steps, or wait for "Background (#153)"
* "More Examples" is gone. "Scenario" + "More Examples" is no longer supported. Use "Scenario Outline" + "Examples" instead.
* Pure Ruby features are no longer supported.
== 0.1.16
Bugfix release.
The template used to generate your features/support/env.rb has changed. You have to apply a minor change
manually for existing Rails projects when you upgrade to this version. Change this:
require 'webrat/rspec-rails'
to this:
require 'webrat/core/matchers'
=== New features
* Finnish translation (Tero Tilus)
* Use Webrat's #contain matcher in generated "I should (not) see" step definitions (Bryan Helmkamp)
== Bugfixes
* Flush output in HTML formatter since JRuby doesnt do it automatically (Diego Carrion)
* Better handling of ARGV (#169 David Chelimsky, Ben Mabey)
* Compatibility with ruby-debug (do ARGV.dup in bin/cucumber so it can restart ruby with same args) (Aslak Hellesøy)
== 0.1.16 2009-01-19
This is a small bugfix release. The most notable improvement is compatibility with Webrat 0.4. Rails/Webrat users should
upgrade both Cucumber and Webrat gems.
=== New features
* Allow argument placeholders in step tables and multiline comments (#121 Joseph Wilk)
* Scenario Outline can be followed by several named Examples sections (#123 Aslak Hellesøy)
* Add the #binary= method back to the Rake task. It is needed by merb_cucumber for running the features of a merb app with it's bundled gems. (Thomas Marek)
* Added a /^When I go to (.+)$/ step definition to webrat_steps.rb and a simple page name to path mapping method (Bryan Helmkamp)
=== Bugfixes
* Fix to run single scenarios when the line number specified doesn't correspond to a step (i.e. blank lines or rows) (#160 Luismi Cavallé)
=== Removed features
== 0.1.15 2009-01-08
Bugfix release
=== New features
* 한국어! (Korean!) (John Hwang)
=== Bugfixes
* --dry-run skips running before/after/steps (#147 Ian Dees)
* Fix a minor bug in the console formatter's summary (David Chelimsky)
* Better quoting of Scenario names in Autotest (Peter Jaros)
* Added some small workarounds for unicode handling on Windows (Aslak Hellesøy)
== 0.1.14 2009-01-04
This is the first release of Cucumber that runs on Ruby 1.9. There are still some encoding-related issues
with Arabic (ar), Japanese (ja) and Simplified Chinese (zh-CN). Patches are welcome. Other than that -
a couple of minor bug fixes and polishing.
=== New features
* Pretty formatter shows number of scenarios (#139 Joseph Wilk)
* Rudimentary support for Ruby 1.9. Now it's ok to file Ruby 1.9-related bugs.
=== Bugfixes
* Fixed "No such file or directory -- cucumber (LoadError)" bug with AutoTest (Aslak Hellesøy)
* Fixed `load_missing_constant': uninitialized constant Dispatcher error with Rails (Aslak Hellesøy)
=== Removed features
* The #binary= method is gone from the Rake task. It will always point to the binary in the current gem. (Aslak Hellesøy)
== 0.1.13 2008-12-20
It's time for some new features again. Output is now much better since you can use diffing, tweak
the output colours and get the full --backtrace if you want. Managing your support/* files became
a little easier since they are now always loaded before the step definitions. Life became easier
for Windows users in Norway (and other countries using unicode in the features). Plus several other
bug fixes.
=== New features
* Console output is no longer bold, but regular. Step arguments are bold instead of blold+underlined. (Aslak Hellesøy)
* Console output can be configured with CUCUMBER_COLORS in your shell. (Aslak Hellesøy)
* Added new --backtrace option to show full backtrace (Aslak Hellesøy)
* Enable RSpec's diffing automatically if RSpec is loaded (Aslak Hellesøy)
* Files in support directories are loaded before any other file (i.e. step definitions.) (#120, Ben Mabey)
* The Rails features generator got some love and is now tested: (Aslak Hellesøy)
* --language is aliased to -l instead of -a (-l became available when --line was refactored) (Aslak Hellesøy)
* Scenario Outlines which through placeholders in the steps allow control of how scenario table values are used. (#57 Joseph Wilk)
* Scenario Outlines are now usable in pure ruby (Joseph Wilk)
* Add support for calling 'pending' from step definitions. (#112 Joseph Wilk)
=== Bugfixes
* Make rails before filters work correctly (#122, #129 Guillermo Álvarez Fernández)
* Proper Unicode support for Windows command shells: Just require cucumber/formatter/unicode in env.rb (Aslak Hellesøy)
* Fixed disappearing "a" on Windows (#81 Aslak Hellesøy)
* Fixed a bug where row step outlines were loosing step tables. (#121 Joseph Wilk, Ben Mabey)
* The Cucumber Autotest plugin now launches JRuby if autotest is run with JRuby (Aslak Hellesøy)
* Provide helpful and non-confusing error message when specified profile is blank. (#118, Ben Mabey)
* Improve handling and error messages for malformed cucumber.yml files. (#117, Ben Mabey)
* document :x run option in command line help (#114, Aslak Hellesøy)
* Change 'visits' to 'visit' in features generator to comply with new Webrat API (Darius Roberts)
=== Removed features
== 0.1.12 2008-12-04
This is the "getting serious with IronRuby release" - largely based on
"Patrick Gannon":'s
blog entry.
== New features
* Cucumber works with IronRuby/.NET - (Aslak Hellesøy)
== Bugfixes
* Fixed bug which was preventing coloring under Autotest (#111, Alan Larkin)
== Removed features
== 0.1.11 2008-12-02
Bugfix release with a couple of minor additional features to the command line options.
=== New features
* Capture output from cucumber in Autotest (Alan Larkin)
* Update cucumber generator to work with latest Webrat (Bryan Helkamp)
* Support for dynamically pluggable formatters (#99 Joseph Wilk)
* --verbose mode to see ruby files and feature files loaded by Cucumber (#106 Joseph Wilk)
=== Bugfixes
* The jcode library is not loaded on JRuby/Rails. Workaround for (Aslak Hellesøy)
* Support including modules for class passed to --format (#109 Joseph Wilk)
=== Removed features
* The cucumber gem no longer depends on the rspec gem. It must be downloaded manually if RSpec is used. (Jeff Rafter)
== 0.1.10 2008-11-25
This release mostly has smaller bugfixes. The most significant new feature is how
line numbers are specified. You can now run multiple features at specific lines numbers like this:
cucumber foo.feature:15 bar.feature:6:45:111
This will run foo.feature at line 15 and bar.feature at line 6, 45 and 111.
=== New features
* Added example showing how to use Cucumber with Test::Unit + Matchy instead of RSpec (Aslak Hellesøy)
* Yield existing world object to World block (#87 Aslak Hellesøy)
* AUTOFEATURE=tRue works (case insensitive) (Aslak Hellesøy)
* Initial support for .NET via IronRuby. (Aslak Hellesøy)
* Lithuanian translation (sauliusgrigaitis)
* New webrat step defintions to wrap the new selects_time, selects_date, and selects_datetime methods. (Ben Mabey)
* Try to load webrat gem if it's not installed as a plugin (Aslak Hellesøy)
* Support example.feature:20 or example.feature:10:20:30 syntax for running features at specific line number(s). (#88 Joseph Wilk)
=== Bugfixes
* Windows - all the 'a' characters in the output have gone on strike (#81 Luis Lavena, Joseph Wilk, Aslak Hellesøy)
* Raise a nice error when encountering step definition without block (#95 Aslak Hellesøy)
* Features written using Ruby where breaking due to missing a line number (#91 Joseph Wilk)
* Directly creating a Table meant the scenario table header was never set which was causing a formatter error (#91 Joseph Wilk)
=== Removed features
* $KCODE='u' is no longer done automatically. Developers should do that explicitly when needed in step definitions or env.rb.
* Step definition without a block being treated as pending (#64 Joseph Wilk)
* The --line option has been removed. Use the new file.feature:line format instead.
== 0.1.9 2008-11-12
With this release Cucumber supports 19 (!) natural languages:
* Arabic
* Chinese Simplified
* Danish
* Dutch
* Estonian
* French
* German
* Italian
* Japanese
* Malay
* Norwegian
* Polish
* Portuguese
* Romanian
* Russian
* Spanish
* Swedish
* Texan
* Welsh
Thanks a lot to everyone who has contributed translations. If you don't see your language here, please
add it:
Main functional changes in this release is "Autotest":
support and how multiline strings work in feature files:
# In your .feature file
Then I should see
A string
that "indents"
and spans
several lines
# In your steps.rb file
Then 'I should see' do |text|
text.should == "A string\n that \"indents\"\nand spans\nseveral lines\n"
The triple quotes are used to define the start and end of a string, and it also defines what gets stripped away
in the inside string. If the triple quotes are indented 4 spaces, then the text within will have the 4 first
spaces removed too.
=== New features
* Added --[no-]color option to force color on or off (Peter Jaros)
* Step definition without a block will be treated as pending (#64 Joseph Wilk)
* Added support for Welsh (improvements welcome) (Joseph Wilk)
* Added --quiet option to hide all development aid output when using Pretty formatter (#69 Joseph Wilk)
* Added --no-snippets option to hide snippets for pending steps when using Pretty formatter (#69 Joseph Wilk)
* Added error messages concerning cucumber.yml. (#70 Ben Mabey)
* Added Autotest support - work in progress... (Peter Jaros)
* Added new --exclude option (Bryan Helkamp)
* Added new --scenario option (Peter Jaros)
* Renamed common_webrat.rb to webrat_steps.rb (Ben Mabey, Aslak Hellesøy)
* Added new feature[:feature_path] task (Roman Gonzalez)
* Added support for Polish (Joseph Wilk)
* Support specifying multiple formatters and multiple outputs (#47 Joseph Wilk)
* Added support for Japanese. (Kakutani Shintaro)
* Added support for Texan (improvements welcome). (Aslak Hellesøy)
=== Bugfixes
* Pending step snippets should escape special Regexp characters (#82 Joseph Wilk)
* Scenario without a body shouldn't show up as complete (#63 Josh Knowles)
* Fixed bug where utf-8 strings where breaking comment alighments. (#79 Joseph Wilk)
* Fixed next_column_index not resetting after large tables (#60, Barry Mitchelson)
* The HTML formatter was rendering everything twice. Cannot invoke visit_feature on formatters in executor (#72 Joseph Wilk)
* Row Scenarios need to support pending? in order for the Profile formatter to work (Joseph Wilk)
* Snippets are not shown for steps which already have a step definition (#65 Joseph Wilk)
* Prevent feature/scenario/pending step comments from containing '//' when running features by specifying a directory with a trailing '/' (Joseph Wilk)
* Scenario tables need spacing after them (#59 Joseph Wilk)
* Support running scenario table rows when using --line argument (#55 Joseph Wilk)
* Don't load cucumber.yml unless it exists (Aslak Hellesøy)
* Fixing bug where specifying line number 1 in a feature which starts with a scenario with a scenario table was raising an error (#56 Joseph Wilk)
=== Removed features
== 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
More Examples:
| input_1 | input_2 | button | output |
| 20 | 30 | add | 50 |
| 2 | 5 | add | 7 |
| 0 | 40 | add | 40 |
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 | | 456 |
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 2008-10-05
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 2008-10-01
First gem release!
Jump to Line
Something went wrong with that request. Please try again.