blob: a9bcd7db9aaeb020f9b122553a91f461c06d6204 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
|
module ActionController
module Assertions
module ModelAssertions
# ensures that the passed record is valid by active record standards. returns the error messages if not
def assert_valid(record)
clean_backtrace do
assert record.valid?, record.errors.full_messages.join("\n")
end
end
end
end
end
|