I've got up to this point all fine and dandy, but I'm getting an error with the unit testing. I've copied and pasted all of the code from the examples and I'm still getting the same error. I'm on Mac OS X 10.5 btw.
And my story_test.rb:Code:Hermes:shovell graham$ rake test:units (in /Users/graham/shovell) rake aborted! You have a nil object when you didn't expect it! You might have expected an instance of Array. The error occurred while evaluating nil.[] (See full trace by running task with --trace) Hermes:shovell graham$
Thanks a lot in advance!Code:require File.dirname(__FILE__) + '/../test_helper' class StoryTest < Test::Unit::TestCase fixtures :stories def test_should_require_name s = Story.create(:name => nil) assert s.errors.on(:name) end def test_should_require_link s = Story.create(:link => nil) assert s.errors.on(:link) end def test_should_create_story s = Story.create( :name => 'My test submission', :link => 'http://www.testsubmission.com/') assert s.valid? end end






Bookmarks