diff options
author | Michael Koziarski <michael@koziarski.com> | 2007-08-06 00:18:50 +0000 |
---|---|---|
committer | Michael Koziarski <michael@koziarski.com> | 2007-08-06 00:18:50 +0000 |
commit | bb94ce92fc1486f7a3d2077e073dd50ce758567d (patch) | |
tree | e722204fd88662a3b3dc69180c9027f3930b0f88 /activerecord/test | |
parent | b59e3d1897fd8701995d9b2dc31b5a4e5c1ebe9d (diff) | |
download | rails-bb94ce92fc1486f7a3d2077e073dd50ce758567d.tar.gz rails-bb94ce92fc1486f7a3d2077e073dd50ce758567d.tar.bz2 rails-bb94ce92fc1486f7a3d2077e073dd50ce758567d.zip |
Let inspect on AR classes work when the table doesn't exist. Closes #9194 [tarmo, nzkoz]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@7278 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
Diffstat (limited to 'activerecord/test')
-rwxr-xr-x | activerecord/test/base_test.rb | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/activerecord/test/base_test.rb b/activerecord/test/base_test.rb index 2851665345..2701a2692d 100755 --- a/activerecord/test/base_test.rb +++ b/activerecord/test/base_test.rb @@ -1696,6 +1696,10 @@ class BasicsTest < Test::Unit::TestCase assert_equal %(#<Topic id: 1>), Topic.find(:first, :select => 'id', :conditions => 'id = 1').inspect assert_equal %(#<Topic id: 1, title: "The First Topic">), Topic.find(:first, :select => 'id, title', :conditions => 'id = 1').inspect end + + def test_inspect_class_without_table + assert_equal "NonExistentTable(Table doesn't exist)", NonExistentTable.inspect + end def test_attribute_for_inspect t = topics(:first) |