test/unit/message_test.rb in has_messages-0.2.0 vs test/unit/message_test.rb in has_messages-0.3.0

- old
+ new

@@ -34,23 +34,23 @@ end def test_should_require_a_sender_id message = new_message(:sender => nil) assert !message.valid? - assert_equal 1, Array(message.errors.on(:sender_id)).size + assert message.errors.invalid?(:sender_id) end def test_should_require_a_sender_type message = new_message(:sender => nil) assert !message.valid? - assert_equal 1, Array(message.errors.on(:sender_type)).size + assert message.errors.invalid?(:sender_type) end def test_should_require_a_state message = new_message(:state => nil) assert !message.valid? - assert_equal 1, Array(message.errors.on(:state)).size + assert message.errors.invalid?(:state) end def test_should_not_require_a_subject message = new_message(:subject => nil) assert message.valid? @@ -266,11 +266,11 @@ end class MessageHiddenTest < Test::Unit::TestCase def setup @message = create_message - @message.hide! + @message.hide end def test_should_record_when_it_was_hidden assert_not_nil @message.hidden_at end @@ -281,11 +281,11 @@ end class MessageUnhiddenTest < Test::Unit::TestCase def setup @message = create_message - @message.hide! - @message.unhide! + @message.hide + @message.unhide end def test_should_not_have_the_recorded_value_when_it_was_hidden assert_nil @message.hidden_at end