Permalink
Browse files

Add test to ensure AR::Model initialization works correctly

  • Loading branch information...
1 parent 800f0a6 commit b236f081eb300d2bdabf279d56367517f1e78fae @jonleighton jonleighton committed Dec 24, 2011
Showing with 5 additions and 0 deletions.
  1. +5 −0 activerecord/test/cases/inclusion_test.rb
@@ -7,6 +7,11 @@ def test_basic_model
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

0 comments on commit b236f08

Please sign in to comment.