mumukit-core 0.4.3 → 0.5.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/mumukit/core/rspec/json_eq.rb +5 -0
- data/lib/mumukit/core/rspec/json_like.rb +20 -0
- data/lib/mumukit/core/rspec.rb +2 -0
- data/lib/mumukit/core/version.rb +1 -1
- data/lib/mumukit/core/yaml.rb +7 -0
- data/lib/mumukit/core.rb +2 -1
- metadata +6 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: afd511f59ac5615b6b1142a3eb8d47fd7e70b2c0
|
4
|
+
data.tar.gz: b3b5ebccc3ac50ded28975ab3dec9c7f95209757
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 85609add9cef872ca9212f6ec9df5d4a6898109b2d063c0187ac7b316f692a5c15e72ec253eeadf14446af6a7dd4b6f26b5839c387451927d9c8f391bd11487c
|
7
|
+
data.tar.gz: c66e2ad7b9dfc773195d79775317b976f614b816b403f1bca14dd5e1aaea83a6a407366cf17a133263bc1ce1cd88043b935fbf48581750c9958560a46be38e6d
|
@@ -0,0 +1,20 @@
|
|
1
|
+
RSpec::Matchers.define :json_like do |expected, options={}|
|
2
|
+
except = options[:except] || []
|
3
|
+
match do |actual|
|
4
|
+
actual.as_json.with_indifferent_access.except(except) == expected.as_json.with_indifferent_access
|
5
|
+
end
|
6
|
+
|
7
|
+
failure_message_for_should do |actual|
|
8
|
+
<<-EOS
|
9
|
+
expected: #{expected.as_json} (#{expected.class})
|
10
|
+
got: #{actual.as_json} (#{actual.class})
|
11
|
+
EOS
|
12
|
+
end
|
13
|
+
|
14
|
+
failure_message_for_should_not do |actual|
|
15
|
+
<<-EOS
|
16
|
+
expected: value != #{expected.as_json} (#{expected.class})
|
17
|
+
got: #{actual.as_json} (#{actual.class})
|
18
|
+
EOS
|
19
|
+
end
|
20
|
+
end
|
data/lib/mumukit/core/version.rb
CHANGED
data/lib/mumukit/core.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: mumukit-core
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.5.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Franco Leonardo Bulgarelli
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2017-01-19 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -142,8 +142,12 @@ files:
|
|
142
142
|
- lib/mumukit/core/object.rb
|
143
143
|
- lib/mumukit/core/regexp.rb
|
144
144
|
- lib/mumukit/core/request.rb
|
145
|
+
- lib/mumukit/core/rspec.rb
|
146
|
+
- lib/mumukit/core/rspec/json_eq.rb
|
147
|
+
- lib/mumukit/core/rspec/json_like.rb
|
145
148
|
- lib/mumukit/core/string.rb
|
146
149
|
- lib/mumukit/core/version.rb
|
150
|
+
- lib/mumukit/core/yaml.rb
|
147
151
|
homepage: https://github.com/mumuki/mumukit-core
|
148
152
|
licenses:
|
149
153
|
- MIT
|