Permalink
Browse files

add be_same_meaning_as matcher

  • Loading branch information...
niku committed Apr 16, 2012
1 parent cbfb2f4 commit fcbe8723d9e6bb5e557b03b2a326d86f79ab6be9
Showing with 6 additions and 0 deletions.
  1. +6 −0 spec/spec_helper.rb
View
@@ -62,3 +62,9 @@ def apn_cert
class BlockRan < StandardError
end
+
+RSpec::Matchers.define :be_same_meaning_as do |expected|
+ match do |actual|
+ ActiveSupport::JSON.decode(actual) == ActiveSupport::JSON.decode(expected)
+ end
+end

0 comments on commit fcbe872

Please sign in to comment.