From bb94ce92fc1486f7a3d2077e073dd50ce758567d Mon Sep 17 00:00:00 2001 From: Michael Koziarski Date: Mon, 6 Aug 2007 00:18:50 +0000 Subject: 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 --- activerecord/test/base_test.rb | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'activerecord/test/base_test.rb') 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.find(:first, :select => 'id', :conditions => 'id = 1').inspect assert_equal %(#), 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) -- cgit v1.2.3