jsonapi_spec_helpers 0.2.2 → 0.2.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/jsonapi_spec_helpers.rb +7 -2
- data/lib/jsonapi_spec_helpers/version.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 319b2470e387e56133c175300436a521422afd02
|
4
|
+
data.tar.gz: 3afed12ece44c28fb3133fc238bd26a9ef9f0992
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 3f318974fe29ca4339a596c116b12cda815ba84044ca336555002190c094c67e504d4f55e15b5185ce17c0fff67dc45970c7f9adbb9fca96baa07f45ce93f7f8
|
7
|
+
data.tar.gz: 52d3b95df9f5b7ebe4f52c7322ecd92ab5e8776dd3ce85676457944697194e199f01cc5611c9eebd00f3a438eb957ce390d3988b9872abca110573757a9a4bdd
|
data/lib/jsonapi_spec_helpers.rb
CHANGED
@@ -4,8 +4,13 @@ require 'jsonapi_spec_helpers/payload'
|
|
4
4
|
|
5
5
|
RSpec::Matchers.define :match_payload do |attribute, expected|
|
6
6
|
match do |actual|
|
7
|
-
# cast
|
8
|
-
|
7
|
+
# cast as_json for things like Time
|
8
|
+
# use as_json instead of to_json for things like hashes
|
9
|
+
if expected.respond_to?(:as_json)
|
10
|
+
actual.as_json == expected.as_json
|
11
|
+
else
|
12
|
+
actual.to_json == expected.to_json
|
13
|
+
end
|
9
14
|
end
|
10
15
|
|
11
16
|
failure_message do |actual|
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: jsonapi_spec_helpers
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.
|
4
|
+
version: 0.2.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Lee Richmond
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-09-
|
11
|
+
date: 2016-09-27 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: pry
|
@@ -135,7 +135,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
135
135
|
version: '0'
|
136
136
|
requirements: []
|
137
137
|
rubyforge_project:
|
138
|
-
rubygems_version: 2.5.1
|
138
|
+
rubygems_version: 2.4.5.1
|
139
139
|
signing_key:
|
140
140
|
specification_version: 4
|
141
141
|
summary: Spec helpers for jsonapi
|