-
Notifications
You must be signed in to change notification settings - Fork 784
RSpec failure_message_for_should_not
is deprecated.
#997
Comments
@justuswilhelm CanCan development has been stopped for a while now, please take a look at #994 |
Dear submitter, Since cancan/raynB hasn't been active for more than 6 months and no body else then ryam himself has commit permissions the cancan project is on a stand still. If your feel that your pull request or bug is still applicable (and hasn't been merged in to cancan) it would be really appreciated if you would resubmit it to cancancan (https://github.com/cancancommunity/cancancan) We hope to see you on the other side! |
Might be a little late, but for anyone coming from Google: I just ran into the same issue, and installing cancancan didn't solve it for me. @justuswilhelm If you want to fix this, simply write your own matcher (more info on that here): RSpec::Matchers.define :be_able_to do |*args|
match do |ability|
ability.can?(*args)
end
failure_message do |ability|
"expected to be able to #{args.map(&:inspect).join(" ")}"
end
failure_message_when_negated do |ability|
"expected not to be able to #{args.map(&:inspect).join(" ")}"
end
end Note that this uses |
Very helpful. Thank you very much! |
I can recommend to switch to https://github.com/CanCanCommunity/cancancan which is community maintained CanCan fork. This issue is fixed there: CanCanCommunity/cancancan#38 |
I can confirm that cancancan just resolved that issue for me with rspec 3. |
Has anyone interested? |
I am getting this deprecation warning when using Rails 4.0.3, Rspec 3.0.0.beta2 and cancan 1.6.10.
The text was updated successfully, but these errors were encountered: