On 10/18/07, Pat Maddox <[EMAIL PROTECTED]> wrote: > step_matchers("arithmetic") do > given_matcher("an addend of $addend") do |addend| > @adder ||= Adder.new > @adder << addend.to_i > end > > when_matcher("they are added") do > @sum = @adder.sum > end > > then_matcher("the sum should be $sum") do |sum| > @sum.should == sum.to_i > end > end > > That allows you to do something like > > Story: Adding numbers > uses arithmetic vocabulary > ... > > > or something along those lines.
I like the idea of mapping a story to a vocabulary. I just don't like doing it in the story text itself - seems more dev-facing than customer-facing. But perhaps the notion of vocabulary is a good thing to have front and center to help the customer understand the constraints of what can be written. Need to think about that some more. Cheers, David _______________________________________________ rspec-users mailing list rspec-users@rubyforge.org http://rubyforge.org/mailman/listinfo/rspec-users