Most of this talk was a basic Cucumber primer. However these things were new to me:
Multi-line arguments
You can use this in a spec; it adds a block argument with the string in it:
"""
multi-line
string
"""
Tables
This Genearates a block argument as an array of hashes. ActiveRecord.create can take this as an argument.
Given the following proposals
|email | title |
|aslak.hellesoy@gmail.com | Cucumber|
|bryan@brynary.com | Webrat |
Abstract Scenarios
Scenario Outline: Email accepted prposals
Given the following proposals
|email | title |
|aslak.hellesoy@gmail.com | Cucumber|
|bryan@brynary.com | Webrat |
And the <proposal> proposal is approved
When I send proposal emails
Then <email> should <what>
Examples:
| proposal | email | what |
| Cucumber | aslak.hellesoy@gmail.com | get email |
| Cucumber | bryan@brynary.com | not get email |
| Webrat | bryan@brynary.com | get email |
Before/After/World
Before do
end
After do |scenario|
end
World do
end
World(MyModule)
Background
Feature: Notification emails
Background:
Tagged Features
Feature: Take over the world
I want it all
@spanish @french @english
Scenario: Take over Europe
Then run:
cucumber -t french doit.feature
# or negative
cucumber -t ~french doit.feature
About the Author