Get all the tests passing under ruby 1.9
This commit is contained in:
parent
df02008ee9
commit
9813d9f1e4
14 changed files with 61 additions and 44 deletions
|
@ -19,7 +19,7 @@ class MessageTest < ActiveSupport::TestCase
|
|||
assert message.errors[:title].any?
|
||||
assert message.errors[:body].any?
|
||||
assert message.errors[:sent_on].any?
|
||||
assert true, message.message_read
|
||||
assert !message.message_read
|
||||
end
|
||||
|
||||
def test_validating_msgs
|
||||
|
@ -76,6 +76,9 @@ class MessageTest < ActiveSupport::TestCase
|
|||
db_msg = msg.class.find(msg.id)
|
||||
assert_equal char, db_msg.title, "Database silently truncated message title"
|
||||
|
||||
rescue ArgumentError => ex
|
||||
assert_equal ex.to_s, "invalid byte sequence in UTF-8"
|
||||
|
||||
rescue ActiveRecord::RecordInvalid
|
||||
# because we only test invalid sequences it is OK to barf on them
|
||||
end
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue