rspec-json_matcher 0.1.1 → 0.1.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +3 -0
- data/lib/rspec/json_matcher/abstract_comparer.rb +2 -2
- data/lib/rspec/json_matcher/version.rb +1 -1
- data/spec/rspec/json_matcher_spec.rb +6 -0
- metadata +2 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 2f0ad49fcdce9262e3cf427f4b6b9f4ce9edae45
|
4
|
+
data.tar.gz: a97a62a5aa6d4fb1faa9b3ff7cc22b6e9b146017
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 9525e34566d425c926be641e5e24a10d96adc4f089ff08affe090a967b52aa81b637ad8c6c29a9104ccb73c013fa21d7c8b0cd5052c432b343b0ad25cc3f6a19
|
7
|
+
data.tar.gz: d4dacfb46db4c153b02782a5aaca22debe27372e1b3adec8cd435000726d52137c2460a09655da69418f375b98776f184ab4862beabfb451e2e39521ee40f757
|
data/CHANGELOG.md
CHANGED
@@ -11,7 +11,7 @@ module RSpec
|
|
11
11
|
if array_or_hash.is_a?(Array)
|
12
12
|
array_or_hash.each_index.to_a
|
13
13
|
else
|
14
|
-
array_or_hash.keys
|
14
|
+
array_or_hash.keys.map(&:to_s)
|
15
15
|
end
|
16
16
|
end
|
17
17
|
|
@@ -53,7 +53,7 @@ module RSpec
|
|
53
53
|
end
|
54
54
|
else
|
55
55
|
expected.keys.all? do |key|
|
56
|
-
actual.has_key?(key) && self.class.compare(actual[key], expected[key])
|
56
|
+
actual.has_key?(key.to_s) && self.class.compare(actual[key.to_s], expected[key])
|
57
57
|
end
|
58
58
|
end
|
59
59
|
end
|
@@ -168,6 +168,12 @@ describe RSpec::JsonMatcher do
|
|
168
168
|
])
|
169
169
|
end
|
170
170
|
end
|
171
|
+
|
172
|
+
context "with symbol keys expectation" do
|
173
|
+
it "matches" do
|
174
|
+
{ "foo" => "bar" }.to_json.should be_json_as(foo: "bar")
|
175
|
+
end
|
176
|
+
end
|
171
177
|
end
|
172
178
|
|
173
179
|
describe "#be_json_including" do
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rspec-json_matcher
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Ryo Nakamura
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2013-12-
|
11
|
+
date: 2013-12-17 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: json
|
@@ -132,4 +132,3 @@ summary: RSpec matcher for testing JSON string
|
|
132
132
|
test_files:
|
133
133
|
- spec/rspec/json_matcher_spec.rb
|
134
134
|
- spec/spec_helper.rb
|
135
|
-
has_rdoc:
|