jsonapi-rspec 0.0.10 → 0.0.11

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: fa870b24a1c1b3fcd2f6fb783dce03bd6249ddfc4cf3de068213e63aa4ed966e
4
- data.tar.gz: eba5c9887ceec4b26b538a4f20337976d4196b28e126052623f9572d1234a65d
3
+ metadata.gz: 1cb9e74645ca848dc856552923c6092f1a50507b46e8a5d3d04c3f74ea8f3853
4
+ data.tar.gz: 99be94b04361649547d569632dfba13d6b4aff18f28125b0f5c2aef592e2a7f4
5
5
  SHA512:
6
- metadata.gz: 7d8ce2a95ddd8b843c24ef98856b771ff33c71f351bbc4f848b19eb425924a3814df254e8b8a288c64089caeb175fe54ce7acac263b42e45b5aae8b0919145f0
7
- data.tar.gz: 3abf2abeb28e42e6294c36ce3fbd6e5a050ed79d990932614e44166b7f89d71e10bdf59e0b2eec415c3f57e66ebf500e3c75f49e40158660a727bedfc9b0d1fa
6
+ metadata.gz: 37d6572ad5001c856154da99ca102d801457674da382f931b339a501e05ff2e483b4f7bbadb43ae640ca7ff9d3a92e261915db96be9a50d9e3cb40706fc72070
7
+ data.tar.gz: 5284418148ab647f9b6bed37fc276f8ce97fba88499b564003b7f129238bf3fed2d1f8ec4fa34b491a790c7a0b86b52b343b8001abd149772dbf43a613bd0a9b
@@ -29,7 +29,7 @@ module JSONAPI
29
29
  end
30
30
 
31
31
  failure_message do |_doc|
32
- if @actual
32
+ if @has_attribute
33
33
  "expected `#{attr_name}` attribute " \
34
34
  "to have value `#{@expected}` but was `#{@actual}`"
35
35
  else
@@ -15,11 +15,11 @@ module JSONAPI
15
15
  end
16
16
 
17
17
  failure_message do |actual|
18
- if !(actual['relationships'] || {}).key?(rel.to_s)
19
- "expected #{actual} to have relationship #{rel}"
20
- else
18
+ if (actual['relationships'] || {}).key?(rel.to_s)
21
19
  "expected #{actual['relationships'][rel.to_s]} " \
22
20
  "to have data #{@data_val}"
21
+ else
22
+ "expected #{actual} to have relationship #{rel}"
23
23
  end
24
24
  end
25
25
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: jsonapi-rspec
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.10
4
+ version: 0.0.11
5
5
  platform: ruby
6
6
  authors:
7
7
  - Lucas Hosseini
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2020-10-15 00:00:00.000000000 Z
11
+ date: 2020-12-19 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rspec-core
@@ -130,7 +130,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
130
130
  - !ruby/object:Gem::Version
131
131
  version: '0'
132
132
  requirements: []
133
- rubygems_version: 3.1.2
133
+ rubygems_version: 3.2.0.rc.1
134
134
  signing_key:
135
135
  specification_version: 4
136
136
  summary: RSpec matchers for JSON API.