hash_dealer 1.4.0 → 1.4.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (4) hide show
  1. data/VERSION +1 -1
  2. data/hash_dealer.gemspec +1 -1
  3. data/lib/matcher.rb +8 -6
  4. metadata +2 -2
data/VERSION CHANGED
@@ -1 +1 @@
1
- 1.4.0
1
+ 1.4.1
data/hash_dealer.gemspec CHANGED
@@ -5,7 +5,7 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = "hash_dealer"
8
- s.version = "1.4.0"
8
+ s.version = "1.4.1"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["Dan Langevin"]
data/lib/matcher.rb CHANGED
@@ -8,15 +8,16 @@ RSpec::Matchers.define(:match_response) do |actual|
8
8
 
9
9
  match do |expected|
10
10
  expected = Comparator.normalize_value(expected)
11
- Comparator.diff(actual, expected) == {}
11
+ @diff = Comparator.diff(actual, expected)
12
+ @diff == {}
12
13
  end
13
14
 
14
15
  failure_message_for_should do |container|
15
- Comparator.diff(actual, expected).pretty_inspect
16
+ @diff.pretty_inspect
16
17
  end
17
18
 
18
19
  failure_message_for_should_not do |container|
19
- Comparator.diff(actual, expected).pretty_inspect
20
+ @diff.pretty_inspect
20
21
  end
21
22
  end
22
23
 
@@ -29,15 +30,16 @@ RSpec::Matchers.define(:match_list) do |actual|
29
30
  expected = Comparator.normalize_value(expected)
30
31
  expected = expected.first if expected.is_a?(Array)
31
32
  actual = actual.first if actual.is_a?(Array)
32
- Comparator.diff(actual, expected) == {}
33
+ @diff = Comparator.diff(actual, expected)
34
+ @diff == {}
33
35
  end
34
36
 
35
37
  failure_message_for_should do |container|
36
- Comparator.diff(actual, expected).pretty_inspect
38
+ @diff.pretty_inspect
37
39
  end
38
40
 
39
41
  failure_message_for_should_not do |container|
40
- Comparator.diff(actual, expected).pretty_inspect
42
+ @diff.pretty_inspect
41
43
  end
42
44
 
43
45
  end
metadata CHANGED
@@ -2,7 +2,7 @@
2
2
  name: hash_dealer
3
3
  version: !ruby/object:Gem::Version
4
4
  prerelease:
5
- version: 1.4.0
5
+ version: 1.4.1
6
6
  platform: ruby
7
7
  authors:
8
8
  - Dan Langevin
@@ -153,7 +153,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
153
153
  requirements:
154
154
  - - ">="
155
155
  - !ruby/object:Gem::Version
156
- hash: -3208818064426284269
156
+ hash: -3389407329229764576
157
157
  segments:
158
158
  - 0
159
159
  version: "0"