Pat, Thanks -- I misunderstood your original response you sent below. For some reason I read it as 'use rspec specs to validate the date logic' and missed the bit in the second paragraph where you suggested creating an explicit date feature. Doh! Sorry for not reading carefully.
This sounds like a good approach. We would have to trust that the developer did indeed call the date validator object. On a large project developers might not read / remember all the feature docs so this could happen. Or the customer might have forgotten about the date validation feature, and this could be an exception where the standard date validation should not apply for some reason. But this is probably fixable via a '# see date_validation.feature' comment. >From a testing perspective it would be nice if cucumber could actually run the date validation feature everywhere it applies. But there are technical issues as then the date feature would have to be parameterized by uri, or whatever varies. More important perhaps this is putting too much emphasis on using cucumber as a testing tool when it is primarily a communication tool. But still if it could be done in a way that was easy to read it might be nice. Anyway you've showed me a very workable approach. Thanks! Steve P.S. Date validation really isn't that important in my application; that's just an example. A real example would be the sales tax calculation in the leasing app I worked on. That was very important, it was a global requirement with some important exceptions. But I think your approach would have worked there as well. On Wed, Jan 7, 2009 at 1:57 PM, Pat Maddox <perg...@gmail.com> wrote: > On Wed, Jan 7, 2009 at 9:23 AM, Steve Molitor <stevemoli...@gmail.com> > wrote: > > I have two related questions: What is the best way to express global > > requirements, and how does one do it in Cucumber. The first question is > the > > one I'm most interested in right now. > > By a global requirement I'm talking about requirements like 'all emails > must > > be formatted like this...' Some people call them constraints, but I'm > > focusing on UI or business rules, not technical things. > > My take on this situation is at > http://rubyforge.org/pipermail/rspec-users/2008-December/011033.html > > Pat > _______________________________________________ > rspec-users mailing list > rspec-users@rubyforge.org > http://rubyforge.org/mailman/listinfo/rspec-users >
_______________________________________________ rspec-users mailing list rspec-users@rubyforge.org http://rubyforge.org/mailman/listinfo/rspec-users