Skip to content
This repository has been archived by the owner on Dec 12, 2021. It is now read-only.

fix deprecation failure_message #1015

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions lib/cancan/matchers.rb
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,11 @@
ability.can?(*args)
end

failure_message_for_should do |ability|
failure_message do |ability|
"expected to be able to #{args.map(&:inspect).join(" ")}"
end

failure_message_for_should_not do |ability|
failure_message_when_negated do |ability|
"expected not to be able to #{args.map(&:inspect).join(" ")}"
end
end