rspec-protobuf 0.2.3 → 0.2.4

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: 329f818e153685d7b3c9295ca051543fe6915f9277478576892152359ebd6498
4
- data.tar.gz: 8b79e6616adac2977f473aac8e7dab6f12efd343b2e2f9af987e597a2ee166dc
3
+ metadata.gz: d635dd29059d952dc1e0db41c3cef03aa4d9e18f098db7a61f34736821317831
4
+ data.tar.gz: db9151a95b2f9d72898eaa5fedaa2b9ecbf0dd1d4bf5cb16506442f7cfcbba88
5
5
  SHA512:
6
- metadata.gz: 6597c162046f769e115efbfe4f1a83b027e1d27bf850873c97df598073707156773cd05a61ff771e6e4c626eac182403a21b8c47878adb53663b1da042599de5
7
- data.tar.gz: 83458a56e5694c6766c99b4f86ab1eb63b2871adb2c9e559cc1bd045c85855f6fd1629aca670089dd11dbf5b0462bae27da2d000248d0f8ff9c2f7d56570e387
6
+ metadata.gz: 55abd020cfdbf915a4b6db65e674367333957e59ff86a0dab804d4807dad3e0d4e250c20b5a2043fc76ac88931293206719720e1844563125a46e56224705a33
7
+ data.tar.gz: a485ad9cfd09055229c816f83baa2105659c3e50ebc5b3a053de6ec758c3bdd854969c606efc681a2f1cfda80821129efb7448cbe64d2bfd828e62ed54cf890b
data/CHANGELOG.md CHANGED
@@ -1,3 +1,6 @@
1
+ ### v0.2.4 (2023-03-15)
2
+ - repeated field bug
3
+
1
4
  ### v0.2.3 (2023-03-14)
2
5
  - repeated fields
3
6
 
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- rspec-protobuf (0.2.3)
4
+ rspec-protobuf (0.2.4)
5
5
  google-protobuf (>= 3)
6
6
  rspec-expectations (>= 3)
7
7
 
@@ -1,5 +1,5 @@
1
1
  module RSpec
2
2
  module Protobuf
3
- VERSION = "0.2.3"
3
+ VERSION = "0.2.4"
4
4
  end
5
5
  end
@@ -34,7 +34,9 @@ RSpec::Matchers.define :be_a_protobuf do |type = nil, **attrs|
34
34
 
35
35
  # customize differ output by removing unreferenced and default attrs
36
36
  @actual = actual.normalized_hash.slice(*attrs.keys).reject do |k, v|
37
- v == actual.class.descriptor.lookup(k.to_s).default
37
+ field = actual.class.descriptor.lookup(k.to_s)
38
+ default = field.label == :repeated ? [] : field.default
39
+ v == default
38
40
  end
39
41
 
40
42
  actual.include?(attrs)
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rspec-protobuf
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.3
4
+ version: 0.2.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Daniel Pepper
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2023-03-14 00:00:00.000000000 Z
11
+ date: 2023-03-15 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: google-protobuf