matchi-rspec 1.0.1 → 1.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +8 -8
- data/lib/matchi/matcher/be.rb +1 -1
- data/lib/matchi/matcher/be_an_instance_of.rb +1 -1
- data/lib/matchi/matcher/be_instance_of.rb +2 -1
- data/lib/matchi/matcher/eq.rb +1 -1
- data/lib/matchi/rspec.rb +2 -2
- metadata +36 -8
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 761d3a03fec25765835388735c0303a09e3756ac1d95ccf0ad46c769befb94bb
|
4
|
+
data.tar.gz: 1d229c348a7bd6f0e85cb874f5337c584dc4f5a54815db6395ea4baf4ffc4eca
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f0e1291c5580a82b4d33b6d38ecb1235263fab75974ca512ee506f4ac27600f627bf5cd378822bf52247d54a4eac8e1cc20ff5ac8b43141a18686b029cd4fb77
|
7
|
+
data.tar.gz: 8ca33e2bf90dfe34a2606ae3a68a155afdcdc3d32dffc7517473a24236286aaf16dc55d6e2b3fc7950c69ee8e114a098393908ecaade2aa9cdff59729eba9fd9
|
data/README.md
CHANGED
@@ -1,19 +1,19 @@
|
|
1
1
|
# Matchi::Rspec
|
2
2
|
|
3
3
|
[![RuboCop Status](https://github.com/fixrb/matchi-rspec/workflows/RuboCop/badge.svg)][workflow_rubocop]
|
4
|
-
[![Build Status](https://api.travis-ci.org/fixrb/matchi-rspec.svg?branch=
|
4
|
+
[![Build Status](https://api.travis-ci.org/fixrb/matchi-rspec.svg?branch=main)][travis]
|
5
5
|
[![Gem Version](https://badge.fury.io/rb/matchi-rspec.svg)][gem]
|
6
|
-
[![Inline docs](https://inch-ci.org/github/fixrb/matchi-rspec.svg?branch=
|
6
|
+
[![Inline docs](https://inch-ci.org/github/fixrb/matchi-rspec.svg?branch=main)][inchpages]
|
7
7
|
[![Documentation](http://img.shields.io/:yard-docs-38c800.svg)][rubydoc]
|
8
8
|
|
9
|
-
> Extend [Matchi](https://github.com/fixrb/matchi) matchers with some
|
9
|
+
> Extend [Matchi](https://github.com/fixrb/matchi) matchers with some RSpec's ones.
|
10
10
|
|
11
11
|
## Installation
|
12
12
|
|
13
13
|
Add this line to your application's Gemfile:
|
14
14
|
|
15
15
|
```ruby
|
16
|
-
gem
|
16
|
+
gem "matchi-rspec"
|
17
17
|
```
|
18
18
|
|
19
19
|
And then execute:
|
@@ -37,14 +37,14 @@ be.matches? { 42 } # => true
|
|
37
37
|
|
38
38
|
```ruby
|
39
39
|
be_instance_of = Matchi::Matcher::BeInstanceOf.new(String)
|
40
|
-
be_instance_of.matches? {
|
40
|
+
be_instance_of.matches? { "foo" } # => true
|
41
41
|
```
|
42
42
|
|
43
43
|
**Equivalence** matcher:
|
44
44
|
|
45
45
|
```ruby
|
46
|
-
eq = Matchi::Matcher::Eq.new(
|
47
|
-
eq.matches? {
|
46
|
+
eq = Matchi::Matcher::Eq.new("foo")
|
47
|
+
eq.matches? { "foo" } # => true
|
48
48
|
```
|
49
49
|
|
50
50
|
## Contact
|
@@ -64,7 +64,7 @@ The [gem](https://rubygems.org/gems/matchi-rspec) is available as open source un
|
|
64
64
|
<p>
|
65
65
|
This project is sponsored by:<br />
|
66
66
|
<a href="https://sashite.com/"><img
|
67
|
-
src="https://github.com/fixrb/matchi-rspec/raw/
|
67
|
+
src="https://github.com/fixrb/matchi-rspec/raw/main/img/sashite.png"
|
68
68
|
alt="Sashite" /></a>
|
69
69
|
</p>
|
70
70
|
|
data/lib/matchi/matcher/be.rb
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
-
require
|
3
|
+
require "matchi/matcher/base"
|
4
4
|
|
5
5
|
# Namespace for the Matchi library.
|
6
6
|
module Matchi
|
@@ -15,6 +15,7 @@ module Matchi
|
|
15
15
|
#
|
16
16
|
# @param expected [#object_id] An expected class.
|
17
17
|
def initialize(expected)
|
18
|
+
super()
|
18
19
|
@expected = expected
|
19
20
|
end
|
20
21
|
|
data/lib/matchi/matcher/eq.rb
CHANGED
data/lib/matchi/rspec.rb
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
-
Dir[File.join File.dirname(__FILE__),
|
3
|
+
Dir[File.join File.dirname(__FILE__), "matcher", "*.rb"].each do |fname|
|
4
4
|
require_relative fname
|
5
5
|
end
|
6
6
|
|
7
|
-
require
|
7
|
+
require "matchi/helper"
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: matchi-rspec
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0
|
4
|
+
version: 1.1.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Cyril Kato
|
8
|
-
autorequire:
|
8
|
+
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2021-
|
11
|
+
date: 2021-05-13 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: matchi
|
@@ -16,14 +16,14 @@ dependencies:
|
|
16
16
|
requirements:
|
17
17
|
- - "~>"
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version: 2.0.
|
19
|
+
version: 2.0.1
|
20
20
|
type: :runtime
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
24
|
- - "~>"
|
25
25
|
- !ruby/object:Gem::Version
|
26
|
-
version: 2.0.
|
26
|
+
version: 2.0.1
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: bundler
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
@@ -52,6 +52,20 @@ dependencies:
|
|
52
52
|
- - ">="
|
53
53
|
- !ruby/object:Gem::Version
|
54
54
|
version: '0'
|
55
|
+
- !ruby/object:Gem::Dependency
|
56
|
+
name: rubocop-md
|
57
|
+
requirement: !ruby/object:Gem::Requirement
|
58
|
+
requirements:
|
59
|
+
- - ">="
|
60
|
+
- !ruby/object:Gem::Version
|
61
|
+
version: '0'
|
62
|
+
type: :development
|
63
|
+
prerelease: false
|
64
|
+
version_requirements: !ruby/object:Gem::Requirement
|
65
|
+
requirements:
|
66
|
+
- - ">="
|
67
|
+
- !ruby/object:Gem::Version
|
68
|
+
version: '0'
|
55
69
|
- !ruby/object:Gem::Dependency
|
56
70
|
name: rubocop-performance
|
57
71
|
requirement: !ruby/object:Gem::Requirement
|
@@ -66,6 +80,20 @@ dependencies:
|
|
66
80
|
- - ">="
|
67
81
|
- !ruby/object:Gem::Version
|
68
82
|
version: '0'
|
83
|
+
- !ruby/object:Gem::Dependency
|
84
|
+
name: rubocop-rake
|
85
|
+
requirement: !ruby/object:Gem::Requirement
|
86
|
+
requirements:
|
87
|
+
- - ">="
|
88
|
+
- !ruby/object:Gem::Version
|
89
|
+
version: '0'
|
90
|
+
type: :development
|
91
|
+
prerelease: false
|
92
|
+
version_requirements: !ruby/object:Gem::Requirement
|
93
|
+
requirements:
|
94
|
+
- - ">="
|
95
|
+
- !ruby/object:Gem::Version
|
96
|
+
version: '0'
|
69
97
|
- !ruby/object:Gem::Dependency
|
70
98
|
name: rubocop-thread_safety
|
71
99
|
requirement: !ruby/object:Gem::Requirement
|
@@ -125,7 +153,7 @@ homepage: https://github.com/fixrb/matchi-rspec
|
|
125
153
|
licenses:
|
126
154
|
- MIT
|
127
155
|
metadata: {}
|
128
|
-
post_install_message:
|
156
|
+
post_install_message:
|
129
157
|
rdoc_options: []
|
130
158
|
require_paths:
|
131
159
|
- lib
|
@@ -140,8 +168,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
140
168
|
- !ruby/object:Gem::Version
|
141
169
|
version: '0'
|
142
170
|
requirements: []
|
143
|
-
rubygems_version: 3.
|
144
|
-
signing_key:
|
171
|
+
rubygems_version: 3.1.4
|
172
|
+
signing_key:
|
145
173
|
specification_version: 4
|
146
174
|
summary: Matchi extension gem to provide some RSpec matchers.
|
147
175
|
test_files: []
|