fixing specs for older versions of ruby and rspec
This commit is contained in:
parent
25637bb33a
commit
9b26f4d767
|
@ -242,6 +242,6 @@ describe CanCan::Ability do
|
||||||
it "should has eated cheezburger" do
|
it "should has eated cheezburger" do
|
||||||
lambda {
|
lambda {
|
||||||
@ability.can? :has, :cheezburger
|
@ability.can? :has, :cheezburger
|
||||||
}.should raise_exception(CanCan::Error, "Nom nom nom. I eated it.")
|
}.should raise_error(CanCan::Error, "Nom nom nom. I eated it.")
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
Spec::Matchers.define :orderlessly_match do |original_string|
|
Spec::Matchers.define :orderlessly_match do |original_string|
|
||||||
match do |given_string|
|
match do |given_string|
|
||||||
original_string.bytes.sum == given_string.bytes.sum
|
original_string.split('').sort == given_string.split('').sort
|
||||||
end
|
end
|
||||||
|
|
||||||
failure_message_for_should do |given_string|
|
failure_message_for_should do |given_string|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user