[rspec-users] Constraints / Global requirements
stevemolitor at gmail.com
Wed Jan 7 17:24:09 EST 2009
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
>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
Anyway you've showed me a very workable approach. Thanks!
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 <pergesu at gmail.com> wrote:
> On Wed, Jan 7, 2009 at 9:23 AM, Steve Molitor <stevemolitor at gmail.com>
> > 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
> > one I'm most interested in right now.
> > By a global requirement I'm talking about requirements like 'all emails
> > 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
> rspec-users mailing list
> rspec-users at rubyforge.org
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the rspec-users