The following example is from the Cucumber wiki Show archive.org snapshot :
Given a blog post named "Random" with Markdown body
"""
Some Title, Eh?
==============
Here is the first paragraph of my blog post. Lorem ipsum dolor sit amet,
consectetur adipiscing elit.
"""
That multi-line string will be given as the last block argument in your step definitions:
Given /^a blog post named "([^\"]*)" with Markdown body$/ do |title, markdown|
Post.create!(:title => title, :body => markdown)
end
Posted by Henning Koch to makandra dev (2010-09-01 08:20)