[rspec-devel] changes to Story Runner steps

David Chelimsky dchelimsky at gmail.com
Wed Oct 24 08:59:49 EDT 2007

On 10/24/07, David Chelimsky <dchelimsky at gmail.com> wrote:
> The tags would replace the need for defining subclasses of StepGroup.
> In rake-like fashion, we can nest groups of steps like this:
> steps_for :interest_bearing_accounts => [:accounts] do
>   Given "my interest rate is $rate" { |rate| ... }
> end

Or in a more rails like fashion, we could do this:

with_steps_for :accounts do
  define_steps_for :savings_accounts do
    Given "my interest rate is $rate" { |rate| ... }

In fact - we could run stories in that context as well:

with_steps_for :accounts do
  Given "my interest rate is $rate" { |rate| ... }
  run 'path/to/story'

So with_steps_for would provide context for:

1. defining new groups of steps
2. defining steps that would only be used for one Story
3. running a Story

More thoughts?

More information about the rspec-devel mailing list