search for: with_messag

Displaying 3 results from an estimated 3 matches for "with_messag".

Did you mean: with_message
2007 May 05
10
have_one and have_present
>Comment By: Luis Lavena (luislavena) > Date: 2007-05-04 23:37 > describe "An Asset" do > before(:each) do > @asset = Asset.new > end > > it { @asset.should have_one(:attachment) } > it { @asset.should have_present(:something) } > end Food for thought on these. I like have_one a lot. It speaks to me as a Rails developer and I think it speaks to
2012 Jan 19
0
Problem in testing with separate validation of :attachment_file_name
...e 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. I noticed that basically all validates_attachment_presen...
2007 May 31
28
Another attempt for a succinct model validation DSL
On 5/28/07, David Chelimsky <dchelimsky at gmail.com> wrote: > The behaviour you''re trying to describe is that the User should > require that passwords bear certain qualities - in this case a length > between 5 and 40. So you need to ask yourself how the User should > behave when this requirement is violated, and then specify that it > behaves that way. > >