diff options
author | Alexey Muranov <muranov@math.univ-toulouse.fr> | 2011-12-20 21:32:39 +0100 |
---|---|---|
committer | Alexey Muranov <alexey.muranov@gmail.com> | 2011-12-30 10:34:02 +0100 |
commit | d3e6e7e484c21d40e8fb7f765099f280f5de85e0 (patch) | |
tree | 057e153eb5768464efabdf40d921ca76dbfc11e1 /activerecord | |
parent | e0ef0936193491689724880599ae26a8f5c2b5a6 (diff) | |
download | rails-d3e6e7e484c21d40e8fb7f765099f280f5de85e0.tar.gz rails-d3e6e7e484c21d40e8fb7f765099f280f5de85e0.tar.bz2 rails-d3e6e7e484c21d40e8fb7f765099f280f5de85e0.zip |
Test case: fixture table name is defined in model
Diffstat (limited to 'activerecord')
-rw-r--r-- | activerecord/test/cases/fixtures_test.rb | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/activerecord/test/cases/fixtures_test.rb b/activerecord/test/cases/fixtures_test.rb index d60e278d1d..859bb7992b 100644 --- a/activerecord/test/cases/fixtures_test.rb +++ b/activerecord/test/cases/fixtures_test.rb @@ -772,4 +772,9 @@ class CustomNameForFixtureOrModelTest < ActiveRecord::TestCase assert_kind_of Admin::ClassNameThatDoesNotFollowCONVENTIONS, admin_randomly_named_b0(:second_instance) end + + def test_table_name_is_defined_in_the_model + assert_equal :randomly_named_table, ActiveRecord::Fixtures::all_loaded_fixtures["admin/randomly_named_a9"].table_name + assert_equal :randomly_named_table, Admin::ClassNameThatDoesNotFollowCONVENTIONS.table_name + end end |