Sha256: 9c33a4ef48e54bddf83be13a0dc62e8a20ea61299626c823fcd5ffb1d76ed0d6

Contents?: true

Size: 234 Bytes

Versions: 9

Compression:

Stored size: 234 Bytes

Contents

# "{'foo': 'bar'}".should match_json {:foo => :bar}
RSpec::Matchers.define :match_json do |expected|
  match do |actual|
    ActiveSupport::JSON.backend.decode(actual) == ActiveSupport::JSON.backend.decode(expected.to_json)
  end
end

Version data entries

9 entries across 9 versions & 1 rubygems

Version Path
devise_oauth2_providable-1.1.1 spec/support/match_json.rb
devise_oauth2_providable-1.1.0 spec/support/match_json.rb
devise_oauth2_providable-1.0.5 spec/support/match_json.rb
devise_oauth2_providable-1.0.4 spec/support/match_json.rb
devise_oauth2_providable-1.0.3 spec/support/match_json.rb
devise_oauth2_providable-1.0.2 spec/support/match_json.rb
devise_oauth2_providable-1.0.1 spec/support/match_json.rb
devise_oauth2_providable-1.0.0 spec/support/match_json.rb
devise_oauth2_providable-1.0.0.beta1 spec/support/match_json.rb