wildcard_matchers 0.1.7 → 0.1.8

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 16a8d8b0edac8954945e5018a609e69ffd257831
4
- data.tar.gz: 1dba61fbe05640ade3e9bb51cdbd44d403183433
3
+ metadata.gz: 52e48c6e9eaad4ea695992466a5a726dc7a1e4b1
4
+ data.tar.gz: 8f75b0056fba808d7fbe54e72db0b17a3c7056a8
5
5
  SHA512:
6
- metadata.gz: b65c2dffab4acc2aca7f8de06a4fd664a69d4ce824d74137808c6d7e3081d86a38797b737bfaad5666bd5b55498a54ff69cde6c8bf770b549b3f74a763ef97ba
7
- data.tar.gz: f0862de1b4bc36cb6de370e41e5583a5e56ab309eae25b0c246c8b6a65f5e51d8cb1596deee14363973b2030276897ff1e1d250f004e9f5f8df2ef50982335dd
6
+ metadata.gz: 8e31b57f16b51787ab151d90f4a476b7a9923ac279aa7fd0d8101ac3bc548b5914b35e33caa7c5efe53dcebbfc61d7658cbc2797b3190f608b80c681ec6e7867
7
+ data.tar.gz: d2d54da9a515823092accf2b0e2c623bf7bfac9dbf2763263087885f19da32c73a7d68991b9940803c4fb242992f977e597b88290763fa5e6a48f7fad0a07c55
@@ -1,3 +1,7 @@
1
+ ## 0.1.8
2
+ * ENHANCEMENT
3
+ * wildcard_match have capablity to use block
4
+
1
5
  ## 0.1.7
2
6
  * FIX
3
7
  * bug of hash_includes corrupts expectation
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.1.7
1
+ 0.1.8
@@ -15,3 +15,10 @@ RSpec::Matchers.define :wildcard_match do |expected|
15
15
  @matcher.errors.join("\n")
16
16
  end
17
17
  end
18
+
19
+ module RSpec::Matchers
20
+ alias wildcard_match_without_block wildcard_match
21
+ def wildcard_match(expected = nil, &block)
22
+ wildcard_match_without_block((block_given? ? block : expected))
23
+ end
24
+ end
@@ -8,6 +8,13 @@ describe "matcher wildcard_match" do
8
8
  end
9
9
  end
10
10
 
11
+ [ [ 1, ->(e) { e == 1 } ],
12
+ ].each do |actual, expected|
13
+ it "match #{actual.inspect} with #{expected} block" do
14
+ actual.should wildcard_match(&expected)
15
+ end
16
+ end
17
+
11
18
  [ [ "1", :is_a_string ],
12
19
  ].each do |actual, expected|
13
20
  it "match #{actual.inspect} with #{expected}" do
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: wildcard_matchers
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.7
4
+ version: 0.1.8
5
5
  platform: ruby
6
6
  authors:
7
7
  - okitan
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2013-07-19 00:00:00.000000000 Z
11
+ date: 2013-07-26 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: facets