From 8ab9daf2803504edbd49f9c97a7f2eb484f15747 Mon Sep 17 00:00:00 2001 From: Sean Griffin Date: Wed, 31 Aug 2016 14:46:40 -0400 Subject: Include user defined attributes in inspect The fact that this only includes column names is an oversight. --- activerecord/test/cases/attributes_test.rb | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'activerecord/test') diff --git a/activerecord/test/cases/attributes_test.rb b/activerecord/test/cases/attributes_test.rb index 7ec1f6f18c..c18851257e 100644 --- a/activerecord/test/cases/attributes_test.rb +++ b/activerecord/test/cases/attributes_test.rb @@ -249,5 +249,11 @@ module ActiveRecord model.foo = "lol" refute model.changed? end + + test "attributes not backed by database columns appear in inspect" do + inspection = OverloadedType.new.inspect + + assert inspection.include?("non_existent_decimal") + end end end -- cgit v1.2.3