From 9b26f4d7675c0967fdf57f219b43b5eecf10af5e Mon Sep 17 00:00:00 2001 From: Ryan Bates Date: Wed, 21 Jul 2010 11:56:19 -0700 Subject: [PATCH] fixing specs for older versions of ruby and rspec --- spec/cancan/ability_spec.rb | 2 +- spec/matchers.rb | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/spec/cancan/ability_spec.rb b/spec/cancan/ability_spec.rb index 82e0404..d070c65 100644 --- a/spec/cancan/ability_spec.rb +++ b/spec/cancan/ability_spec.rb @@ -242,6 +242,6 @@ describe CanCan::Ability do it "should has eated cheezburger" do lambda { @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 diff --git a/spec/matchers.rb b/spec/matchers.rb index a9871d7..f83bc45 100644 --- a/spec/matchers.rb +++ b/spec/matchers.rb @@ -1,6 +1,6 @@ Spec::Matchers.define :orderlessly_match do |original_string| match do |given_string| - original_string.bytes.sum == given_string.bytes.sum + original_string.split('').sort == given_string.split('').sort end failure_message_for_should do |given_string|