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|