aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/test
diff options
context:
space:
mode:
authorSean Griffin <sean@seantheprogrammer.com>2016-08-31 14:46:40 -0400
committerSean Griffin <sean@seantheprogrammer.com>2016-08-31 14:46:40 -0400
commit8ab9daf2803504edbd49f9c97a7f2eb484f15747 (patch)
tree7fc8e21fb8e9b48d4fa908791b00816b9c9e8dfd /activerecord/test
parentb347156b15aea7f6229203e0cc1a58937ecb8e93 (diff)
downloadrails-8ab9daf2803504edbd49f9c97a7f2eb484f15747.tar.gz
rails-8ab9daf2803504edbd49f9c97a7f2eb484f15747.tar.bz2
rails-8ab9daf2803504edbd49f9c97a7f2eb484f15747.zip
Include user defined attributes in inspect
The fact that this only includes column names is an oversight.
Diffstat (limited to 'activerecord/test')
-rw-r--r--activerecord/test/cases/attributes_test.rb6
1 files changed, 6 insertions, 0 deletions
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