Re: [rspec-users] stuck on testing validation

2008-03-06 Thread Oliver Barnes
Hi Namrata, thanks, that's a great resource and I ended up beefing my tests based on the recommendations there. actually though, the problem I was having was that validations weren't being recognized by the test suite. later I found out that when regenerating the scaffold for the app a while back

Re: [rspec-users] stuck on testing validation

2008-03-04 Thread Namrata Tiwari
Here is a very good example by Luke, which I think you should follow - http://www.lukeredpath.co.uk/2006/8/29/developing-a-rails-model-using-bdd-and-rspec-part-1 fyi, Namrata -- Posted via http://www.ruby-forum.com/. ___ rspec-users mailing list rspec-

[rspec-users] stuck on testing validation

2008-03-03 Thread Oliver Barnes
Hello, I must be doing something dumb, but here it goes... why does this work? before(:each) do @work = Work.new end #for testing validates_presence_of :title it "should require a title" do @work.title = nil @work.should_not be_valid end while this doesn't: def valid_w