[rspec-users] How to represent Story of Life grid in Then clause

Jarkko Laine jarkko at jlaine.net
Tue Nov 20 03:11:05 EST 2007

On 20.11.2007, at 3.44, Ed Howland wrote:

> In this story from Dan's Game of Life:
> Scenario: the grid has three cells
>     Given 3 x 3 grid
>     When I create a cell at 0, 0
>     And I create a cell at 0, 1
>     And I create a cell at 2, 2
>     Then the grid should look like:
>       XX.
>       ...
>       ..X
> How do you set up matchers for the grid at the end.  Are all the
> indented lines after a Then passed to the Then matcher as separate
> strings with multiple Then()s getting called or a single string
> separated by new lines?

No, they aren't (see http://rspec.lighthouseapp.com/projects/5645/ 
However, multiline parameters aren't supported in plain text story  
steps yet, either.


Jarkko Laine

More information about the rspec-users mailing list