[Rspec-users] Some specs

Chris Roos chrisjroos at gmail.com
Tue Jul 25 07:39:28 EDT 2006


Hi,

I'd really appreciate someone looking at some specifications I have.
The context in each case is realised in the setup block (I'm assuming
this is standard practice?).  The specifications should be
self-explanatory.

I'm wondering if anyone can see anything obviously bad/wrong with what
I have?  I'm intentionally not stating anything else as in theory the
specs should speak for themselves.

Thanks in advance,

Chris

---- specifications ----

A validatable object with no validators
- should be valid
- should have no error messages

A validatable object with an always valid validator
- should be valid
- should have no error message

A validatable object with an always invalid validator
- should be invalid
- should have the standard error message

A validatable object with an always invalid validator and an
overridden standard error message
- should use the overridden standard error message

A validatable object with an always invalid validator that has a
custom error message
- should have the custom error message

A validatable object with one always valid validator and one always
invalid validator
- should be invalid
- should have the standard error message

A validatable object with two always invalid validators, one of which
has a custom error message
- should be invalid
- should have standard and custom error message


More information about the Rspec-users mailing list