test/test_classy-inheritance.rb in classy-inheritance-0.6.2 vs test/test_classy-inheritance.rb in classy-inheritance-0.6.4

- old
+ new

@@ -6,14 +6,10 @@ def setup @user = User.new end - def test_active_record_should_have_classy_inheritance_included - assert ActiveRecord::Base.included_modules.include?(Stonean::ClassyInheritance) - end - def test_active_record_should_respond_to_depends_on assert ActiveRecord::Base.respond_to?(:depends_on) end def test_user_should_respond_to_find_with_profile @@ -54,8 +50,17 @@ @user.first_name = 'joe' @user.last_name = 'bloggs' @user.email = 'joe@bloggs.co.uk' assert @user.valid? + end + + def test_user_should_have_nice_error_message + @user = User.new(:first_name => "andy") + @user.valid? + + assert @user.errors.full_messages.include?("Last name can't be blank") + assert @user.errors.full_messages.include?("Email can't be blank") + assert @user.errors.full_messages.include?("Login can't be blank") end end