Displaying 1 result from an estimated 1 matches for "1qq".
Did you mean:
1q
2007 Jul 26
3
Spec for validation plugin
...< ActiveRecord::Base
validates_as_uk_postcode :post_code
end
In my model spec I want something like this (assume @location has been setup
as a new Location instance):
it "should be invalid if the post code is incorrectly formatted" do
@location.post_code => ''Q1 1QQ''
@location.should_not be_valid
@location.should have(1).error_on(:post_code)
end
But there are many examples of invalid post codes and they are already
tested in the plugin''s own test cases. I only really want to test my code,
rather than retest the plugin.
So my qu...