Ed Howland
2007-Nov-20 01:44 UTC
[rspec-users] How to represent Story of Life grid in Then clause
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? Thanks Ed -- Ed Howland http://greenprogrammer.blogspot.com "The information transmitted is intended only for the person or entity to which it is addressed and may contain proprietary, confidential and/or legally privileged material. Any review, retransmission, dissemination or other use of, or taking of any action in reliance upon, this information by persons or entities other than the intended recipient is prohibited. If you received this in error, please contact the sender and delete the material from all computers."
Jarkko Laine
2007-Nov-20 08:11 UTC
[rspec-users] How to represent Story of Life grid in Then clause
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/ tickets/132-plain-text-stories-should-support-given-and-given). However, multiline parameters aren''t supported in plain text story steps yet, either. //jarkko -- Jarkko Laine http://jlaine.net http://dotherightthing.com http://www.railsecommerce.com http://odesign.fi