Skip to content

Instantly share code, notes, and snippets.

@ayamomiji
Created March 30, 2012 09:20
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ayamomiji/2250253 to your computer and use it in GitHub Desktop.
Save ayamomiji/2250253 to your computer and use it in GitHub Desktop.
RAILS SUCKS
RSpec::Matchers.define :be_json do |expected|
match do |actual|
acturl_json =
ActiveSupport::JSON.decode(ActiveSupport::JSON.encode(actual))
expected_json =
ActiveSupport::JSON.decode(ActiveSupport::JSON.encode(expected))
acturl_json == expected_json
end
diffable
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment