Displaying 1 result from an estimated 1 matches for "test_valid_message_new".
2008 Jan 04
5
Confused by the unit test results.
I''m testing the relation between two of my models: MessageThread
(parent), which has_many Message (children). When I run the following
test, it gives me an error:
---------------------------------
# test with a valid message
def test_valid_message_new
thread = MessageThread.new :title => ''awesome thread''
message = thread.messages.build(:body =>''total awesomeness'')
assert thread.valid?, ''thread not valid''
assert (thread.messages.size == 1)
assert_equal ''total...