Displaying 1 result from an estimated 1 matches for "not_with".
Did you mean:
init_with
2012 Jan 19
0
Problem in testing with separate validation of :attachment_file_name
...est
require ''spec/helper''
describe Example do
it { should validate_attachment_presence(:attachment) }
it { should validate_format_of(:attachment_file_name).
with(''example.png'') }
it { should validate_format_of(:attachment_file_name).
not_with(''example.zip'').
with_message(/is invalid/) }
end
This causes my validates_attachment_presence(:attachment) test to fail.
If I remove the validates_format_of :attachment_file_name line from my
model, the presence test now passes, but, obviously, the format test
fails....