diff options
author | wycats <wycats@gmail.com> | 2010-04-26 23:32:30 -0700 |
---|---|---|
committer | wycats <wycats@gmail.com> | 2010-04-26 23:32:30 -0700 |
commit | 91963e9e33eb5a28297323f1346aeb8b643e9d65 (patch) | |
tree | 0452dbaf63110fb5a19c958da50d4677dee11333 /activerecord/test/cases/fixtures_test.rb | |
parent | d5d717161d853d8d7240da59b41a879bdac6e982 (diff) | |
parent | c1d73270717f30498f8f4d55d6695509107c2834 (diff) | |
download | rails-91963e9e33eb5a28297323f1346aeb8b643e9d65.tar.gz rails-91963e9e33eb5a28297323f1346aeb8b643e9d65.tar.bz2 rails-91963e9e33eb5a28297323f1346aeb8b643e9d65.zip |
Merge branch 'master' of github.com:rails/rails
Diffstat (limited to 'activerecord/test/cases/fixtures_test.rb')
-rw-r--r-- | activerecord/test/cases/fixtures_test.rb | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/activerecord/test/cases/fixtures_test.rb b/activerecord/test/cases/fixtures_test.rb index d24283fe4e..3ce23209cc 100644 --- a/activerecord/test/cases/fixtures_test.rb +++ b/activerecord/test/cases/fixtures_test.rb @@ -16,6 +16,9 @@ require 'models/treasure' require 'models/matey' require 'models/ship' require 'models/book' +require 'models/admin' +require 'models/admin/account' +require 'models/admin/user' class FixturesTest < ActiveRecord::TestCase self.use_instantiated_fixtures = true @@ -507,7 +510,7 @@ class FasterFixturesTest < ActiveRecord::TestCase end class FoxyFixturesTest < ActiveRecord::TestCase - fixtures :parrots, :parrots_pirates, :pirates, :treasures, :mateys, :ships, :computers, :developers + fixtures :parrots, :parrots_pirates, :pirates, :treasures, :mateys, :ships, :computers, :developers, :"admin/accounts", :"admin/users" def test_identifies_strings assert_equal(Fixtures.identify("foo"), Fixtures.identify("foo")) @@ -629,6 +632,11 @@ class FoxyFixturesTest < ActiveRecord::TestCase assert_kind_of DeadParrot, parrots(:polly) assert_equal pirates(:blackbeard), parrots(:polly).killer end + + def test_namespaced_models + assert admin_accounts(:signals37).users.include?(admin_users(:david)) + assert_equal 2, admin_accounts(:signals37).users.size + end end class ActiveSupportSubclassWithFixturesTest < ActiveRecord::TestCase |