aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/test
diff options
context:
space:
mode:
authorJon Leighton <j@jonathanleighton.com>2011-12-24 11:06:38 +0000
committerJon Leighton <j@jonathanleighton.com>2011-12-24 11:08:16 +0000
commitb236f081eb300d2bdabf279d56367517f1e78fae (patch)
treec1eaeb3257dcd0d274ab0f4dd7c66226992e200e /activerecord/test
parent800f0a6eb60c11575e55366c104d1e2d3e963d16 (diff)
downloadrails-b236f081eb300d2bdabf279d56367517f1e78fae.tar.gz
rails-b236f081eb300d2bdabf279d56367517f1e78fae.tar.bz2
rails-b236f081eb300d2bdabf279d56367517f1e78fae.zip
Add test to ensure AR::Model initialization works correctly
Diffstat (limited to 'activerecord/test')
-rw-r--r--activerecord/test/cases/inclusion_test.rb5
1 files changed, 5 insertions, 0 deletions
diff --git a/activerecord/test/cases/inclusion_test.rb b/activerecord/test/cases/inclusion_test.rb
index 374e4e01d3..4b4590e218 100644
--- a/activerecord/test/cases/inclusion_test.rb
+++ b/activerecord/test/cases/inclusion_test.rb
@@ -7,6 +7,11 @@ class BasicInclusionModelTest < ActiveRecord::TestCase
assert_equal "Ronnie Kemper", Teapot.find(1).name
end
+ def test_initialization
+ t = Teapot.new(:name => "Bob")
+ assert_equal "Bob", t.name
+ end
+
def test_inherited_model
teapot = CoolTeapot.create!(:name => "Bob")
teapot.reload