Sha256: 978e001618848759ba0094638f8d7a601bcc85a0a9c1bc37c7d027a89d011651
Contents?: true
Size: 496 Bytes
Versions: 12
Compression:
Stored size: 496 Bytes
Contents
require 'abstract_unit' require 'fixtures/comment' require 'fixtures/user' require 'fixtures/employee' require 'fixtures/hack' class TestPolymorphic < Test::Unit::TestCase fixtures :users, :employees, :comments, :hacks def test_polymorphic_has_many comments = Hack.find('andrew').comments assert comments[0].person_id = 'andrew' end def test_polymorphic_has_one first_comment = Hack.find('andrew').first_comment assert first_comment.person_id = 'andrew' end end
Version data entries
12 entries across 12 versions & 1 rubygems