wildcard_matchers 0.9.1 → 0.9.2

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: 45307b92b06dfed4450726f0201518e4461bde8e
4
- data.tar.gz: fe3b7bc1c39b5a7c101e2deee5bef86ba88fbc67
3
+ metadata.gz: a7ae1ea449d073688746ff3fa0d7186417d2035b
4
+ data.tar.gz: fa25d175b944e85b91dfeb12fa20426b73acdba4
5
5
  SHA512:
6
- metadata.gz: 967e78b9e87a9cda1c9c52c065fcbc2e1906e44d3230d4fe38d53d9c83413a41cb4bd1f7165bba438f9e50c5ed55653990e86b68b1e1ec23f14a79428f275bb2
7
- data.tar.gz: ce08ce2939df22224722b0c92a1043432ffc3c7c29f7a256772fa2dbdd6db01076fca6763263ddee2f60e8e08ec4d78d687c765cad213dad419e253490f415b0
6
+ metadata.gz: 79416af7f558737617d61c2ecfccda5fa488d4c05f5026c521c4d7297bf24ee3f74c1035dd9f3b78cfccd5f7287c19f9082888617e9edae1d2284faf01cec18c
7
+ data.tar.gz: c85a121c0075b9b90cadf160ca232cbda0a57ad52648b5a953bf2d5545543185067f95dc001c33372008733ba6258e599d68e922b2ccfe97eec6ea479ae83f1c
@@ -1,9 +1,8 @@
1
1
  language: ruby
2
2
  rvm:
3
- - 1.9.2
4
3
  - 1.9.3
5
4
  - 2.0.0
6
- - 2.2.0
5
+ - 2.3.0
7
6
  gemfile:
8
7
  - Gemfile
9
8
  before_install: gem install bundler -v 1.10.5
@@ -1,3 +1,8 @@
1
+ ## 0.9.2
2
+
3
+ * FIXED
4
+ * hash_includes passes when key does not exist but key is nil
5
+
1
6
  ## 0.9.1
2
7
 
3
8
  * FIXED
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.9.1
1
+ 0.9.2
@@ -16,7 +16,11 @@ module WildcardMatchers
16
16
  errors << "#{position}: expect #{actual} to have key #{key}" unless actual.has_key?(key)
17
17
  else
18
18
  key.each do |key, value|
19
- errors.push(*self.class.superclass.check_errors(actual[key], value, position + "[#{key.inspect}]"))
19
+ unless actual.has_key?(key)
20
+ errors << "#{position}: expect #{actual} to have key #{key}"
21
+ else
22
+ errors.push(*self.class.superclass.check_errors(actual[key], value, position + "[#{key.inspect}]"))
23
+ end
20
24
  end
21
25
  end
22
26
  end
@@ -11,6 +11,7 @@ describe WildcardMatchers::Matchers::HashIncludes do
11
11
  [ [ { :a => 1, :b => 1, :c => 1 }, :hash_includes, :a, :d ],
12
12
  [ { :a => 1, :b => 1, :c => 1 }, :hash_includes, :a, :b => 2 ],
13
13
  [ { :a => 1, :b => 1, :c => 1 }, :hash_includes, :a, :b => String ],
14
+ [ { :a => 1, :b => 1, :c => 1 }, :hash_includes, :a, :b => String, :d => nil ],
14
15
  ].each do |actual, matcher, *args|
15
16
  it_behaves_like "not wildcard match", actual, matcher, *args
16
17
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: wildcard_matchers
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.9.1
4
+ version: 0.9.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - okitan
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-04-01 00:00:00.000000000 Z
11
+ date: 2016-04-27 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: facets