Class: SuperDiff::EqualityMatchers::Hash
- Inherits:
-
Base
- Object
- Base
- SuperDiff::EqualityMatchers::Hash
show all
- Defined in:
- lib/super_diff/equality_matchers/hash.rb
Class Method Summary
collapse
Instance Method Summary
collapse
Methods inherited from Base
call, #call, #initialize
Class Method Details
.applies_to?(value) ⇒ Boolean
4
5
6
|
# File 'lib/super_diff/equality_matchers/hash.rb', line 4
def self.applies_to?(value)
value.class == ::Hash
end
|
Instance Method Details
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
|
# File 'lib/super_diff/equality_matchers/hash.rb', line 8
def fail
<<~OUTPUT.strip
Differing hashes.
#{
Helpers.style(
:deleted,
"Expected: #{Helpers.inspect_object(expected)}",
)
}
#{
Helpers.style(
:inserted,
" Actual: #{Helpers.inspect_object(actual)}",
)
}
Diff:
#{diff}
OUTPUT
end
|