[rspec-users] changes to Story Runner steps

David Chelimsky dchelimsky at gmail.com
Wed Oct 24 01:07:03 EDT 2007


Hi all,

The following only affects people who have bravely begun to experiment
with the 2 day-old plain text story runner and definable groups of
steps.

For those who fit that bill, I just committed a few changes that will
require you to make changes to your code.

The StepMatchers class is now the StepGroup class.

The step_matchers methods on PlainTextStoryRunner and StepGroup is now
just steps. So instead of defining a group like this:

# old - no longer supported
matchers = StepMatchers.new do
  step_matchers do |add|
    add.given(...) {...}
  end
end

# new
steps = StepGroup.new do
  steps do |add|
    add.given(...) {...}
  end
end

And actually, I've tried 'define' instead of 'add' for the block arg
and it speaks pretty nicely:

steps = StepGroup.new do
  steps do |define|
    define.given(...) {...}
  end
end

There will be more changes coming over the next few days. Just a heads up.


More information about the rspec-users mailing list