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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 336151e1a5f05b188de3ad2f0805439d0a5d6f1a
4
- data.tar.gz: e2217114aa93b3b48b6d53586d007314c6c4d4d7
3
+ metadata.gz: d76a714370d9df24d69b4d605113242f3476ad90
4
+ data.tar.gz: a73b57267d81f11f3a1e3f89d44b10b28d8ef016
5
5
  SHA512:
6
- metadata.gz: 176f80942e4a3b2d2bc5af158da01ca5947e9835b6f5ac2e09df118b74d9d182f0432fa55164cec503eb5b3e17d4729a1099c6ae0dec64d057ad479ea804723b
7
- data.tar.gz: 3c1843de409f2b8b7843149db97a5f9a75de947cd862de7ce39a375bd0468359bfb2ef5b09495e9456741270de02fa72c6ea0719d3f5b58a4a06e73e43169505
6
+ metadata.gz: c5cfa563bf4a74408c0f8d0fdc9257e8ef448e3c8664dda72ba483edee21252f3e9826f480a4120bf238b5803b05d56b0be97ff8dc10022d131abd1d2c01d84a
7
+ data.tar.gz: 16fa5f90f9b16a0a1dd5dddefc422a42294b1616ce6c51cdb520fd28b853b03fd8f9c45dc843bc619d7f31eb4cd9466b4d44d9d159c1377d065a921d6baa10e2
@@ -1 +1 @@
1
- 0.0.7
1
+ 0.0.8
@@ -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.4'
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'
@@ -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 = Array(definition).flatten(1)
13
- name = params.first.to_s.split('_').map(&:capitalize).join.to_sym
14
- expected_args = params[1..-1]
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.7
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-02-24 00:00:00.000000000 Z
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.4
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.4
26
+ version: 0.0.5
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: bundler
29
29
  requirement: !ruby/object:Gem::Requirement