Story Runner: Two 'then' steps output as 'then..and' :)

Maybe I’m slow, but I just noticed that the following code…

When ‘I login’
When ‘I do something else’

…will output as…

When ‘I login’
And ‘I do something else’

The same is true for two ‘Then’ steps

That is really cool!
Reusable steps and coherent English output.

  • Andy


View this message in context:
http://www.nabble.com/Story-Runner%3A-Two-'then'-steps-output-as-'then..and'-%3A)-tf4625856.html#a13209643
Sent from the rspec-users mailing list archive at Nabble.com.

On 10/15/07, Andy W. [email protected] wrote:

Maybe I’m slow, but I just noticed that the following code…

When ‘I login’
When ‘I do something else’

You’re encouraged to write this as:

When ‘I login’
And ‘I do something else’

Cheers,
David

Thanks David,

After rereading Dan’s original rbehave introduction, i see its important
to
think of steps are either

  1. Givens
  2. Events (When)
  3. Outcomes (Then)

In a ‘Then…And’ scenario, the ‘And’ is an Outcome and therefore
reusable
only as an outcome.
That is, either ‘Then’ or a in another ‘Then…And’.

Similarly, in a ‘When…And’ scenario, this ‘And’ is an Event step and is
reusable as a ‘When’ or in another ‘When…And’.

  • Andy

David C.-2 wrote:

When ‘I login’

Sent from the rspec-users mailing list archive at Nabble.com.


View this message in context:
http://www.nabble.com/Re%3A-Story-Runner%3A-Two-'then'-steps-output-as-'then..and'-%3A)-tf4626482.html#a13225454
Sent from the rspec-users mailing list archive at Nabble.com.