search for: must_validate

Displaying 1 result from an estimated 1 matches for "must_validate".

2007 May 05
10
have_one and have_present
...(:something) } That''s a little more Rails-developer-friendly than customer-friendly, but it still ''speaks'' better than ''have_present'' for me. FYI - Jay Fields has a Validatable framework that includes some test/unit assertions that look like this: Foo.must_validate do presence_of :name format_of(:name).with(/^[A-Z]/) numericality_of(:age).only_integer(true) end Because Spec::Rails behaviours inherit from Test::Unit::TestCase, you can install the validations gem (gem install validatable) and use these as/is with RSpec. Or, if you want it to feel more s...