Commit 94a1154e by Tyler Porter

Add aliases for error messages to matchers

parent 8524e8fe
...@@ -27,9 +27,10 @@ module Paperclip ...@@ -27,9 +27,10 @@ module Paperclip
"Should have an attachment named #{@attachment_name}" "Should have an attachment named #{@attachment_name}"
end end
def negative_failure_message def failure_message_when_negated
"Should not have an attachment named #{@attachment_name}" "Should not have an attachment named #{@attachment_name}"
end end
alias negative_failure_message failure_message_when_negated
def description def description
"have an attachment named #{@attachment_name}" "have an attachment named #{@attachment_name}"
......
...@@ -26,9 +26,10 @@ module Paperclip ...@@ -26,9 +26,10 @@ module Paperclip
"Attachment #{@attachment_name} should be required" "Attachment #{@attachment_name} should be required"
end end
def negative_failure_message def failure_message_when_negated
"Attachment #{@attachment_name} should not be required" "Attachment #{@attachment_name} should not be required"
end end
alias negative_failure_message failure_message_when_negated
def description def description
"require presence of attachment #{@attachment_name}" "require presence of attachment #{@attachment_name}"
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment