matchi-rspec 0.0.3 → 0.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- checksums.yaml.gz.sig +2 -3
- data.tar.gz.sig +0 -0
- data/VERSION.semver +1 -1
- data/checksum/matchi-rspec-0.0.3.gem.sha512 +1 -0
- data/lib/matchi/rspec/be.rb +9 -15
- data/lib/matchi/rspec/be_an_instance_of.rb +7 -15
- data/lib/matchi/rspec/be_instance_of.rb +30 -35
- data/lib/matchi/rspec/eq.rb +7 -15
- data/matchi-fix.gemspec +2 -2
- metadata +8 -7
- metadata.gz.sig +0 -0
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 3928705929dead23a02fb3126b65e27a795683c6
|
4
|
+
data.tar.gz: 802f838b1bab030c3e46d694436ad2b20dbbecd0
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 450d591851853762589518d34defe98860c15e4b1f64fa04c058180347d1768a3658cfb59502e865d96c9e1db376222c642f4fec06ceffbfdb37611a2142eb67
|
7
|
+
data.tar.gz: 5273a945241070bbd1f5963a0893eef9bc2d615d9f219c4923d2272ed5ff56d0dbe430432beb4471376ccbeb20ad182c4560308fb48bf9251c93db143b0f8769
|
checksums.yaml.gz.sig
CHANGED
@@ -1,3 +1,2 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
���_D����ze!�
|
1
|
+
$(<�Ʌ���w�k��?o�Q�����Z��/k�T=�Ө���$8��䛕����&BH��g��;�z��7����&�C�n����j�1�p���*�^��Qr�7I�A�rӎA��驱�/��ܴ���bK���X��gKg7<���xs�:�����ɠaKc]��NU����N�N�!�$s���,�����:Z�;��TW�#�ֈ�M
|
2
|
+
�����V��;���ۼ
|
data.tar.gz.sig
CHANGED
Binary file
|
data/VERSION.semver
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.0
|
1
|
+
0.1.0
|
@@ -0,0 +1 @@
|
|
1
|
+
dd28d15a4dd21aaadd93492a572313efdd55f9bda0179d0d6ff434ffe3c659c67f16145fbf13396bec3cd2c700272e55f19e0f4b05371ef1f6e73842128ee42a
|
data/lib/matchi/rspec/be.rb
CHANGED
@@ -1,20 +1,14 @@
|
|
1
|
+
require 'matchi/matchers_base' unless defined?(::Matchi::MatchersBase)
|
2
|
+
|
1
3
|
# Namespace for the Matchi library.
|
2
4
|
module Matchi
|
3
|
-
#
|
4
|
-
|
5
|
-
#
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
end
|
11
|
-
|
12
|
-
# Returns a hash of one key-value pair with a key corresponding to the
|
13
|
-
# matcher and a value corresponding to its initialize parameters.
|
14
|
-
#
|
15
|
-
# @return [Hash] A hash of one key-value pair.
|
16
|
-
def to_h
|
17
|
-
{ Be: [@expected] }
|
5
|
+
# Collection of matchers.
|
6
|
+
module Matchers
|
7
|
+
# **Identity** matcher.
|
8
|
+
module Be
|
9
|
+
# The matcher.
|
10
|
+
class Matcher < Equal::Matcher
|
11
|
+
end
|
18
12
|
end
|
19
13
|
end
|
20
14
|
end
|
@@ -2,21 +2,13 @@ require_relative 'be_instance_of'
|
|
2
2
|
|
3
3
|
# Namespace for the Matchi library.
|
4
4
|
module Matchi
|
5
|
-
#
|
6
|
-
|
7
|
-
#
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
end
|
13
|
-
|
14
|
-
# Returns a hash of one key-value pair with a key corresponding to the
|
15
|
-
# matcher and a value corresponding to its initialize parameters.
|
16
|
-
#
|
17
|
-
# @return [Hash] A hash of one key-value pair.
|
18
|
-
def to_h
|
19
|
-
{ BeAnInstanceOf: [@expected] }
|
5
|
+
# Collection of matchers.
|
6
|
+
module Matchers
|
7
|
+
# **Type/class** matcher.
|
8
|
+
module BeAnInstanceOf
|
9
|
+
# The matcher.
|
10
|
+
class Matcher < BeInstanceOf::Matcher
|
11
|
+
end
|
20
12
|
end
|
21
13
|
end
|
22
14
|
end
|
@@ -1,42 +1,37 @@
|
|
1
|
+
require 'matchi/matchers_base' unless defined?(::Matchi::MatchersBase)
|
2
|
+
|
1
3
|
# Namespace for the Matchi library.
|
2
4
|
module Matchi
|
3
|
-
#
|
4
|
-
|
5
|
-
#
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
# @param expected [#object_id] An expected class.
|
11
|
-
def initialize(expected)
|
12
|
-
@expected = expected
|
13
|
-
end
|
5
|
+
# Collection of matchers.
|
6
|
+
module Matchers
|
7
|
+
# **Type/class** matcher.
|
8
|
+
module BeInstanceOf
|
9
|
+
# The matcher.
|
10
|
+
class Matcher
|
11
|
+
include MatchersBase
|
14
12
|
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
yield.instance_of?(@expected)
|
25
|
-
end
|
26
|
-
|
27
|
-
# Returns a string representing the matcher.
|
28
|
-
#
|
29
|
-
# @return [String] A string representing the matcher.
|
30
|
-
def to_s
|
31
|
-
"be_instance_of #{@expected.inspect}"
|
32
|
-
end
|
13
|
+
# Initialize the matcher with an object.
|
14
|
+
#
|
15
|
+
# @example A string matcher
|
16
|
+
# Matchi::BeInstanceOf.new(String)
|
17
|
+
#
|
18
|
+
# @param expected [#object_id] An expected class.
|
19
|
+
def initialize(expected)
|
20
|
+
@expected = expected
|
21
|
+
end
|
33
22
|
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
23
|
+
# @example Is it an instance of string?
|
24
|
+
# be_instance_of = Matchi::BeInstanceOf.new(String)
|
25
|
+
# be_instance_of.matches? { 'foo' } # => true
|
26
|
+
#
|
27
|
+
# @yieldreturn [#instance_of?] the actual value to compare to the
|
28
|
+
# expected one.
|
29
|
+
#
|
30
|
+
# @return [Boolean] Comparison between actual and expected values.
|
31
|
+
def matches?
|
32
|
+
yield.instance_of?(@expected)
|
33
|
+
end
|
34
|
+
end
|
40
35
|
end
|
41
36
|
end
|
42
37
|
end
|
data/lib/matchi/rspec/eq.rb
CHANGED
@@ -1,20 +1,12 @@
|
|
1
1
|
# Namespace for the Matchi library.
|
2
2
|
module Matchi
|
3
|
-
#
|
4
|
-
|
5
|
-
#
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
end
|
11
|
-
|
12
|
-
# Returns a hash of one key-value pair with a key corresponding to the
|
13
|
-
# matcher and a value corresponding to its initialize parameters.
|
14
|
-
#
|
15
|
-
# @return [Hash] A hash of one key-value pair.
|
16
|
-
def to_h
|
17
|
-
{ Eq: [@expected] }
|
3
|
+
# Collection of matchers.
|
4
|
+
module Matchers
|
5
|
+
# **Equivalence** matcher.
|
6
|
+
module Eq
|
7
|
+
# The matcher.
|
8
|
+
class Matcher < Eql::Matcher
|
9
|
+
end
|
18
10
|
end
|
19
11
|
end
|
20
12
|
end
|
data/matchi-fix.gemspec
CHANGED
@@ -14,13 +14,13 @@ Gem::Specification.new do |spec|
|
|
14
14
|
spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
|
15
15
|
spec.require_paths = ['lib']
|
16
16
|
|
17
|
-
spec.add_dependency 'matchi', '~> 0.1
|
17
|
+
spec.add_dependency 'matchi', '~> 1.0.1'
|
18
18
|
|
19
19
|
spec.add_development_dependency 'bundler', '~> 1.10'
|
20
20
|
spec.add_development_dependency 'rake', '~> 10.4'
|
21
21
|
spec.add_development_dependency 'yard', '~> 0.8'
|
22
22
|
spec.add_development_dependency 'simplecov', '~> 0.10'
|
23
|
-
spec.add_development_dependency 'rubocop', '~> 0.
|
23
|
+
spec.add_development_dependency 'rubocop', '~> 0.35'
|
24
24
|
|
25
25
|
spec.cert_chain = ['certs/gem-fixrb-public_cert.pem']
|
26
26
|
private_key = File.expand_path('~/.ssh/gem-fixrb-private_key.pem')
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: matchi-rspec
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0
|
4
|
+
version: 0.1.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Cyril Wack
|
@@ -30,7 +30,7 @@ cert_chain:
|
|
30
30
|
dzJvWzQ1+dJU6WQv75E9ddSkaQrK3nhdgQVu+/wgvGSrsMvOGNz+LXaSDxQqZuwX
|
31
31
|
0KNQFuIukfrdk8URwRnHoAnvx4U93iUw
|
32
32
|
-----END CERTIFICATE-----
|
33
|
-
date: 2015-11-
|
33
|
+
date: 2015-11-29 00:00:00.000000000 Z
|
34
34
|
dependencies:
|
35
35
|
- !ruby/object:Gem::Dependency
|
36
36
|
name: matchi
|
@@ -38,14 +38,14 @@ dependencies:
|
|
38
38
|
requirements:
|
39
39
|
- - "~>"
|
40
40
|
- !ruby/object:Gem::Version
|
41
|
-
version: 0.1
|
41
|
+
version: 1.0.1
|
42
42
|
type: :runtime
|
43
43
|
prerelease: false
|
44
44
|
version_requirements: !ruby/object:Gem::Requirement
|
45
45
|
requirements:
|
46
46
|
- - "~>"
|
47
47
|
- !ruby/object:Gem::Version
|
48
|
-
version: 0.1
|
48
|
+
version: 1.0.1
|
49
49
|
- !ruby/object:Gem::Dependency
|
50
50
|
name: bundler
|
51
51
|
requirement: !ruby/object:Gem::Requirement
|
@@ -108,14 +108,14 @@ dependencies:
|
|
108
108
|
requirements:
|
109
109
|
- - "~>"
|
110
110
|
- !ruby/object:Gem::Version
|
111
|
-
version: '0.
|
111
|
+
version: '0.35'
|
112
112
|
type: :development
|
113
113
|
prerelease: false
|
114
114
|
version_requirements: !ruby/object:Gem::Requirement
|
115
115
|
requirements:
|
116
116
|
- - "~>"
|
117
117
|
- !ruby/object:Gem::Version
|
118
|
-
version: '0.
|
118
|
+
version: '0.35'
|
119
119
|
description: Matchi extension gem to provide some RSpec matchers.
|
120
120
|
email:
|
121
121
|
- contact@cyril.email
|
@@ -141,6 +141,7 @@ files:
|
|
141
141
|
- checksum/matchi-fix-0.1.3.gem.sha512
|
142
142
|
- checksum/matchi-fix-0.1.4.gem.sha512
|
143
143
|
- checksum/matchi-rspec-0.0.2.gem.sha512
|
144
|
+
- checksum/matchi-rspec-0.0.3.gem.sha512
|
144
145
|
- lib/matchi/rspec.rb
|
145
146
|
- lib/matchi/rspec/be.rb
|
146
147
|
- lib/matchi/rspec/be_an_instance_of.rb
|
@@ -168,7 +169,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
168
169
|
version: '0'
|
169
170
|
requirements: []
|
170
171
|
rubyforge_project:
|
171
|
-
rubygems_version: 2.4.5
|
172
|
+
rubygems_version: 2.4.5.1
|
172
173
|
signing_key:
|
173
174
|
specification_version: 4
|
174
175
|
summary: Extend Matchi matchers with some RSpec's ones.
|
metadata.gz.sig
CHANGED
Binary file
|