restspec 0.2.5 → 0.2.6

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
  SHA1:
3
- metadata.gz: a97d97c28453655d98cd90ca3fb15b677f1ab365
4
- data.tar.gz: 0be14fb17fd36e69b4c77a9514cec93072fc6216
3
+ metadata.gz: d1403eca3180dfa8f249ce3fead22bb161ff7d20
4
+ data.tar.gz: d0570bf19544f321eb35109802e8366d87cbc466
5
5
  SHA512:
6
- metadata.gz: c01b50d7ad8ff56d5815189fcc9158b60edd8f3468d1a1c17330760961df1184821f72b59ae1967019260fe0580fdf082898d75c793fa221cbc371bc19b6ecde
7
- data.tar.gz: 4476e5e1ba23d6d4d99d79e7293bf5f6f4159f1459207138c0d87549b145820dd37069a700f13b3de55a999a1c8b2848f4c362c73e0f1eb7bd2cde8a8acdaeac
6
+ metadata.gz: beff9885cf2d3aa080a65c65eb93926bb69f8c61d2c48fe93bfdb5b1a3e85b9ee7ff8a4e0da032d55b1a7bd423810415532247283c285b5dc0ce3891e4c67950
7
+ data.tar.gz: a8181a79efd09bf428094c34ac7f5c184cab60c2222e897f1416768b25e1e7ef80a15830dbc9d76f601602223add6384e19abb24c63a1cb575797c9f490513c3
@@ -7,10 +7,10 @@ module Restspec::Schema::Types
7
7
  end
8
8
 
9
9
  def example_for(attribute)
10
- return sample_item.try(id_property) if sample_item.present?
10
+ return sample_item[id_property] if sample_item.present?
11
11
 
12
- if create_response.code == 201 && create_response.body.try(id_property).present?
13
- create_response.body.try(id_property)
12
+ if create_response.code == 201 && create_response.body[id_property].present?
13
+ create_response.body[id_property]
14
14
  else
15
15
  hardcoded_fallback
16
16
  end
@@ -20,7 +20,7 @@ module Restspec::Schema::Types
20
20
 
21
21
  def valid?(attribute, value)
22
22
  return true unless perform_validation?
23
- item_ids.any? { |item| item.try(id_property) == value }
23
+ item_ids.any? { |item| item[id_property] == value }
24
24
  end
25
25
 
26
26
  private
@@ -1,3 +1,3 @@
1
1
  module Restspec
2
- VERSION = "0.2.5"
2
+ VERSION = "0.2.6"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: restspec
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.5
4
+ version: 0.2.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - juliogarciag