Sha256: ca0ebeb682ff7fc532ca0d239c831d08c9edddb1a2e85913b2e391d497dc41e7

Contents?: true

Size: 230 Bytes

Versions: 35

Compression:

Stored size: 230 Bytes

Contents

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

Version data entries

35 entries across 35 versions & 6 rubygems

Version Path
devise_oauth-3.0.3 spec/support/match_json.rb
devise_oauth-3.0.2 spec/support/match_json.rb
devise_oauth-3.0.1 spec/support/match_json.rb
devise_oauth2_rails4-2.1.8 spec/support/match_json.rb
devise_oauth2_rails4-2.1.7 spec/support/match_json.rb
devise_oauth2_rails4-2.1.6 spec/support/match_json.rb
devise_oauth2_rails4-2.1.5 spec/support/match_json.rb
devise_oauth2_rails4-2.1.4 spec/support/match_json.rb
devise_oauth2_rails4-2.1.3 spec/support/match_json.rb
devise_oauth2_rails4-2.0.3 spec/support/match_json.rb
devise_oauth2_rails4-2.1.0 spec/support/match_json.rb
devise_oauth2_rails4-2.0.2 spec/support/match_json.rb
devise_oauth2_rails4-2.0.1 spec/support/match_json.rb
devise_oauth2_rails4-2.0.0 spec/support/match_json.rb
devise_oauth2_rails4-1.1.8 spec/support/match_json.rb
devise_oauth2_rails4-1.1.7 spec/support/match_json.rb
devise_oauth2_rails4-1.1.6 spec/support/match_json.rb
devise_oauth2_rails4-1.1.5 spec/support/match_json.rb
devise_oauth2_rails4-1.1.4 spec/support/match_json.rb
devise_oauth2_rails4-1.1.3 spec/support/match_json.rb