search for: test_add_to_wishlist

Displaying 1 result from an estimated 1 matches for "test_add_to_wishlist".

2005 Oct 27
0
has_one with Single Table Inheritance - NameError : uninitialized constant
...elf.wishlist.nil?* wishlist = Wishlist.new(''title''=>''Default Wish List'') wishlist.user = self self.wishlist = wishlist end self.wishlist.items<<album self.wishlist.save end What''s strange is this works perfectly in my Wishlist unit test. def test_add_to_wishlist assert_nil @normal_user.wishlist album = Album.find(1) @normal_user.add_to_wishlist(album) assert_not_nil @normal_user.wishlist assert_equal 1, @normal_user.wishlist.items.length assert_equal album, @normal_user.wishlist.items[0] end no errors. passes all assertions. any ideas? _________________...