[rspec-devel] changes to Story Runner steps

Josh Chisholm joshuachisholm at gmail.com
Wed Oct 24 09:43:22 EDT 2007


Yeah this all makes sense.

The suggestion was less about sexy and more about mapping between the
story and the matcher. String bending lets you copy/paste the story
line (unaltered) into your matcher, which makes for a nice workflow
for the first few stories. But I totally buy the consistency argument,
I was thinking in plain text mode :-)


On 10/24/07, David Chelimsky <dchelimsky at gmail.com> wrote:
> 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| ... }
>   end
> end
>
> 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'
> end
>
> 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?
> _______________________________________________
> rspec-devel mailing list
> rspec-devel at rubyforge.org
> http://rubyforge.org/mailman/listinfo/rspec-devel
>


More information about the rspec-devel mailing list