expect 0.0.7 → 0.0.8
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/VERSION.semver +1 -1
- data/expect.gemspec +1 -1
- data/lib/expect/matcher.rb +4 -5
- metadata +4 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: d76a714370d9df24d69b4d605113242f3476ad90
|
4
|
+
data.tar.gz: a73b57267d81f11f3a1e3f89d44b10b28d8ef016
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c5cfa563bf4a74408c0f8d0fdc9257e8ef448e3c8664dda72ba483edee21252f3e9826f480a4120bf238b5803b05d56b0be97ff8dc10022d131abd1d2c01d84a
|
7
|
+
data.tar.gz: 16fa5f90f9b16a0a1dd5dddefc422a42294b1616ce6c51cdb520fd28b853b03fd8f9c45dc843bc619d7f31eb4cd9466b4d44d9d159c1377d065a921d6baa10e2
|
data/VERSION.semver
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.0.
|
1
|
+
0.0.8
|
data/expect.gemspec
CHANGED
@@ -13,7 +13,7 @@ Gem::Specification.new do |spec|
|
|
13
13
|
spec.executables = spec.files.grep(/^exe\//) { |f| File.basename(f) }
|
14
14
|
spec.require_paths = ['lib']
|
15
15
|
|
16
|
-
spec.add_dependency 'matchi', '~> 0.0.
|
16
|
+
spec.add_dependency 'matchi', '~> 0.0.5'
|
17
17
|
|
18
18
|
spec.add_development_dependency 'bundler', '~> 1.8'
|
19
19
|
spec.add_development_dependency 'rake', '~> 10.0'
|
data/lib/expect/matcher.rb
CHANGED
@@ -5,14 +5,13 @@ module Expect
|
|
5
5
|
module Matcher
|
6
6
|
# Evaluate the expectation with the passed block.
|
7
7
|
#
|
8
|
-
# @param [Hash, Symbol] definition
|
8
|
+
# @param [Array, Hash, Symbol] definition
|
9
9
|
#
|
10
10
|
# @return [Boolean] report if the expectation is true or false
|
11
11
|
def self.pass?(definition, &actual)
|
12
|
-
params
|
13
|
-
name
|
14
|
-
|
15
|
-
matcher = Matchi.const_get(name).new(*expected_args)
|
12
|
+
params = Array(definition).flatten(1)
|
13
|
+
name = params.first.to_s.split('_').map(&:capitalize).join.to_sym
|
14
|
+
matcher = Matchi.fetch(name, *params[1..-1])
|
16
15
|
|
17
16
|
matcher.matches?(&actual)
|
18
17
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: expect
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.8
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Cyril Wack
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-
|
11
|
+
date: 2015-03-10 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: 0.0.
|
19
|
+
version: 0.0.5
|
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: 0.0.
|
26
|
+
version: 0.0.5
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: bundler
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|