rspec-partial-hash 0.0.2 → 0.0.3

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: 75b906452898e0de91af20bc4b8d570859b47039
4
- data.tar.gz: 045165c5136b525f66fb8939133b3220e7b3917b
3
+ metadata.gz: 92b511f1711bd1e6b7427596dbd6dddaae017519
4
+ data.tar.gz: e070bc6b17c1c39bd101931f8479de0415b28821
5
5
  SHA512:
6
- metadata.gz: e22b267aa260110a0eb9de22b474e37d659f4e2a72af6f2ddc1b558536fbdf47b6b91b72b883a6bbf7c1cb6ba2cc7ce85fed6d14f3af0168c691a3ab5c98075f
7
- data.tar.gz: 8a2d452b0bd6df2c3769b11815a8bc9d2309fd9014e572a3dda55e564263f803990685d5d3e0de3221fc92a0ba2c61d1680cfa98f1a1a65d254d4e455f0caea3
6
+ metadata.gz: a147c00551a728426c9e87bbdc276475a7d927df29873a46b145113665a505fd17946c2f50ecab373ca0cc6373037f14f5c1a312c50dd7bcc860e19faca7267b
7
+ data.tar.gz: 74242ad15ec0116c4b696951ac4ce686bf81d92d7ac1fc4c3990979f5b548a5b84b11d48c538c6e0d6e93ead2030bab27cf385a6712cbca420bfa6ac66cbffd4
@@ -21,9 +21,11 @@ PartialHashMatcher = Class.new {
21
21
  RSpec::Matchers.define :include_partial_hash do |expected|
22
22
 
23
23
  match do |actual|
24
- raise ArgumentError, "Expectation not a hash" unless
25
- expected.respond_to?(:to_h) or expected.is_a?(Hash)
24
+ if expected
25
+ raise ArgumentError, "Expectation not a hash" unless
26
+ (expected.respond_to?(:to_h) or expected.is_a?(Hash)) and expected.respond_to?(:keys)
27
+ end
26
28
  !actual.nil? && !expected.nil? && PartialHashMatcher.partial_match?(expected, actual)
27
29
  end
28
30
 
29
- end
31
+ end
@@ -1,5 +1,5 @@
1
1
  module Rspec
2
2
  module PartialHash
3
- VERSION = "0.0.2"
3
+ VERSION = "0.0.3"
4
4
  end
5
5
  end
@@ -20,6 +20,7 @@ Gem::Specification.new do |spec|
20
20
 
21
21
  spec.add_development_dependency "bundler", "~> 1.5"
22
22
  spec.add_development_dependency "rake"
23
- spec.add_development_dependency "activesupport", '>= 3.0'
24
- spec.add_development_dependency "rspec"
23
+
24
+ spec.add_dependency "rspec"
25
+ spec.add_dependency "activesupport", '>= 3.0'
25
26
  end
metadata CHANGED
@@ -1,71 +1,71 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rspec-partial-hash
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.2
4
+ version: 0.0.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Alexander Staubo
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-03-12 00:00:00.000000000 Z
11
+ date: 2016-05-11 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
15
15
  requirement: !ruby/object:Gem::Requirement
16
16
  requirements:
17
- - - ~>
17
+ - - "~>"
18
18
  - !ruby/object:Gem::Version
19
19
  version: '1.5'
20
20
  type: :development
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
- - - ~>
24
+ - - "~>"
25
25
  - !ruby/object:Gem::Version
26
26
  version: '1.5'
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: rake
29
29
  requirement: !ruby/object:Gem::Requirement
30
30
  requirements:
31
- - - '>='
31
+ - - ">="
32
32
  - !ruby/object:Gem::Version
33
33
  version: '0'
34
34
  type: :development
35
35
  prerelease: false
36
36
  version_requirements: !ruby/object:Gem::Requirement
37
37
  requirements:
38
- - - '>='
38
+ - - ">="
39
39
  - !ruby/object:Gem::Version
40
40
  version: '0'
41
41
  - !ruby/object:Gem::Dependency
42
- name: activesupport
42
+ name: rspec
43
43
  requirement: !ruby/object:Gem::Requirement
44
44
  requirements:
45
- - - '>='
45
+ - - ">="
46
46
  - !ruby/object:Gem::Version
47
- version: '3.0'
48
- type: :development
47
+ version: '0'
48
+ type: :runtime
49
49
  prerelease: false
50
50
  version_requirements: !ruby/object:Gem::Requirement
51
51
  requirements:
52
- - - '>='
52
+ - - ">="
53
53
  - !ruby/object:Gem::Version
54
- version: '3.0'
54
+ version: '0'
55
55
  - !ruby/object:Gem::Dependency
56
- name: rspec
56
+ name: activesupport
57
57
  requirement: !ruby/object:Gem::Requirement
58
58
  requirements:
59
- - - '>='
59
+ - - ">="
60
60
  - !ruby/object:Gem::Version
61
- version: '0'
62
- type: :development
61
+ version: '3.0'
62
+ type: :runtime
63
63
  prerelease: false
64
64
  version_requirements: !ruby/object:Gem::Requirement
65
65
  requirements:
66
- - - '>='
66
+ - - ">="
67
67
  - !ruby/object:Gem::Version
68
- version: '0'
68
+ version: '3.0'
69
69
  description: Partial hash matching for RSpec.
70
70
  email:
71
71
  - alex@bengler.no
@@ -73,7 +73,7 @@ executables: []
73
73
  extensions: []
74
74
  extra_rdoc_files: []
75
75
  files:
76
- - .gitignore
76
+ - ".gitignore"
77
77
  - Gemfile
78
78
  - LICENSE.txt
79
79
  - README.md
@@ -94,17 +94,17 @@ require_paths:
94
94
  - lib
95
95
  required_ruby_version: !ruby/object:Gem::Requirement
96
96
  requirements:
97
- - - '>='
97
+ - - ">="
98
98
  - !ruby/object:Gem::Version
99
99
  version: '0'
100
100
  required_rubygems_version: !ruby/object:Gem::Requirement
101
101
  requirements:
102
- - - '>='
102
+ - - ">="
103
103
  - !ruby/object:Gem::Version
104
104
  version: '0'
105
105
  requirements: []
106
106
  rubyforge_project:
107
- rubygems_version: 2.0.3
107
+ rubygems_version: 2.2.5
108
108
  signing_key:
109
109
  specification_version: 4
110
110
  summary: Partial hash matching for RSpec.