Re: [Rails] First Test Failures: Anything Obvious?

2010-08-17 Thread Colin Law
On 17 August 2010 05:18, Terry Michaels li...@ruby-forum.com wrote: Still following my rails book (more like, adapting to my project as I go). My first attempt at a unit test failed. Adapting the example in the book, I came up with this: require 'test_helper' class RecordingTest

Re: [Rails] First Test Failures: Anything Obvious?

2010-08-17 Thread Colin Law
On 17 August 2010 06:31, Gintautas Šimkus dihita...@gmail.com wrote: Try to save the object first and then check for validity. I don't think that is right, for a start it will not save if it is invalid. Colin -- You received this message because you are subscribed to the Google Groups Ruby

[Rails] First Test Failures: Anything Obvious?

2010-08-16 Thread Terry Michaels
Still following my rails book (more like, adapting to my project as I go). My first attempt at a unit test failed. Adapting the example in the book, I came up with this: require 'test_helper' class RecordingTest ActiveSupport::TestCase test record attributes must not be empty do recording

Re: [Rails] First Test Failures: Anything Obvious?

2010-08-16 Thread Gintautas Šimkus
Try to save the object first and then check for validity. 2010/8/17 Terry Michaels li...@ruby-forum.com Still following my rails book (more like, adapting to my project as I go). My first attempt at a unit test failed. Adapting the example in the book, I came up with this: require