structure_compare 0.1.3 → 0.1.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
  SHA1:
3
- metadata.gz: f70b9e05e01bb83d7b2a2a380be3f186193c577c
4
- data.tar.gz: 3dcba3d335af36520716576ca24095feedbbd132
3
+ metadata.gz: 3f2e2820a623f8736e70f56a9be77e4058d2d92e
4
+ data.tar.gz: 45dc459fd60189528bdc3a101ba669040e905670
5
5
  SHA512:
6
- metadata.gz: 9ff592a8c888e294256bc8f068ebf1f0664beedf3563f4049106c93c67c763db9fe357516d5197c11569f2175e79ab9e9798204e98498754e5ecd22a1a0da8cc
7
- data.tar.gz: db54b52473897f95ae1356f370a94025d87d81dac556fa1e04f58d2457621b1842324f3198ef8a2a84d133e916f55627d33186489da7472eb986c70f63fbe1f3
6
+ metadata.gz: f79e4d739d1ac39ad71bae9d0cce84ec53c0ea26c2441221f5ecbfd5e1504ba52fbbbe090fcb3a46bd318da21748688a6d6d4ce0a8f0df8d32bf2a8fb6156251
7
+ data.tar.gz: d1d6c84c7a1f1a15ea54ec65ea66572d2897475ba0a6a93c33d217c0f68e24596a446aa6d8fe5a62c9a3678eb8dd731edadcf04756355cab3e348bed2eca7fe6
@@ -81,14 +81,16 @@ module StructureCompare
81
81
  expected_keys = expected.keys
82
82
  actual_keys = actual.keys
83
83
 
84
+ failure_message = "hash keys aren't equal. " \
85
+ "expected: #{expected_keys.map(&:to_s).join(',')}, " \
86
+ "actual: #{actual_keys.map(&:to_s).join(',')}"
87
+
84
88
  if @options[:indifferent_access]
85
89
  # NOTE: not all hash keys are symbols/strings, only convert symbols
86
90
  expected_keys.map! { |key| key.is_a?(Symbol) ? key.to_s : key }
87
91
  actual_keys.map! { |key| key.is_a?(Symbol) ? key.to_s : key }
88
92
  end
89
93
 
90
- failure_message = "hash keys aren't equal"
91
-
92
94
  if @options[:strict_key_order]
93
95
  if expected_keys != actual_keys
94
96
  not_equal_error!(expected_keys, actual_keys, failure_message)
@@ -1,3 +1,3 @@
1
1
  module StructureCompare
2
- VERSION = "0.1.3"
2
+ VERSION = "0.1.4"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: structure_compare
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.3
4
+ version: 0.1.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Markus Seeger