match_json 0.0.6 → 0.0.7
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +4 -0
- data/README.md +16 -1
- data/lib/match_json/matchers.rb +0 -14
- data/lib/match_json/minitest.rb +7 -0
- data/lib/match_json/rspec.rb +7 -0
- data/lib/match_json/version.rb +1 -1
- data/spec/spec_helper.rb +1 -1
- data/test/test_helper.rb +1 -1
- metadata +5 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: dbc46ca994f742211eef028282ffe68fd347348c
|
4
|
+
data.tar.gz: 8319a12a7de9cac7164d26055df0e0f4d2c92f21
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a5bab51f9a0988851bb3231fda9eb38d848ef3d376eb7288812866b562d407ddf394fe0fec43163b2e40833491024e7a6890818bc3eac40224c42dd4bfb6d17b
|
7
|
+
data.tar.gz: 7d78a70cfcc882073f20b7de4c55c760bacce249bcce889ff52a2555baf45e0bb5b27de5dff1c11f4e548a1237a4d043110b8a633ccaacad6a1cddcad7c700d0
|
data/CHANGELOG.md
CHANGED
data/README.md
CHANGED
@@ -2,7 +2,7 @@
|
|
2
2
|
|
3
3
|
![Match JSON](assets/match.png "Match JSON")
|
4
4
|
|
5
|
-
Test your JSON in RSpec
|
5
|
+
Test your JSON in RSpec, MiniTest or Cucumber, like a boss.
|
6
6
|
|
7
7
|
> The **only** matcher I let my kids play with
|
8
8
|
> -- Mom
|
@@ -76,6 +76,21 @@ gem 'match_json'
|
|
76
76
|
|
77
77
|
- Run `bundle`
|
78
78
|
|
79
|
+
### Rspec
|
80
|
+
|
81
|
+
In spec_helper.rb or rails_helper.rb include library as following:
|
82
|
+
|
83
|
+
```
|
84
|
+
require 'match_json/rspec'
|
85
|
+
```
|
86
|
+
|
87
|
+
###
|
88
|
+
|
89
|
+
In minitest's test_helper.rb add this:
|
90
|
+
|
91
|
+
```
|
92
|
+
require 'match_json/minitest'
|
93
|
+
```
|
79
94
|
|
80
95
|
## Advanced usage
|
81
96
|
|
data/lib/match_json/matchers.rb
CHANGED
@@ -7,17 +7,3 @@ module MatchJson
|
|
7
7
|
end
|
8
8
|
end
|
9
9
|
end
|
10
|
-
|
11
|
-
if defined?(RSpec)
|
12
|
-
RSpec.configure do |config|
|
13
|
-
config.include MatchJson::Matchers
|
14
|
-
end
|
15
|
-
|
16
|
-
RSpec::Matchers.alias_matcher :match_json, :include_json
|
17
|
-
elsif defined?(Minitest)
|
18
|
-
class Minitest::Test
|
19
|
-
include MatchJson::Matchers
|
20
|
-
|
21
|
-
alias_method :match_json, :include_json
|
22
|
-
end
|
23
|
-
end
|
data/lib/match_json/version.rb
CHANGED
data/spec/spec_helper.rb
CHANGED
data/test/test_helper.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: match_json
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.7
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Pavel Gabriel
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date:
|
12
|
+
date: 2017-05-26 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: rspec
|
@@ -119,6 +119,8 @@ files:
|
|
119
119
|
- lib/match_json.rb
|
120
120
|
- lib/match_json/matchers.rb
|
121
121
|
- lib/match_json/matchers/include_json.rb
|
122
|
+
- lib/match_json/minitest.rb
|
123
|
+
- lib/match_json/rspec.rb
|
122
124
|
- lib/match_json/version.rb
|
123
125
|
- match_json.gemspec
|
124
126
|
- spec/match_json/include_json_spec.rb
|
@@ -148,7 +150,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
148
150
|
version: '0'
|
149
151
|
requirements: []
|
150
152
|
rubyforge_project:
|
151
|
-
rubygems_version: 2.
|
153
|
+
rubygems_version: 2.6.8
|
152
154
|
signing_key:
|
153
155
|
specification_version: 4
|
154
156
|
summary: RSpec matcher for JSON documents
|