fixing specs for older versions of ruby and rspec

This commit is contained in:
Ryan Bates 2010-07-21 11:56:19 -07:00
parent 25637bb33a
commit 9b26f4d767
2 changed files with 2 additions and 2 deletions

View File

@ -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

View File

@ -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|