wildcard_matchers 0.1.7 → 0.1.8
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +4 -0
- data/VERSION +1 -1
- data/lib/wildcard_matchers/rspec.rb +7 -0
- data/spec/wildcard_matchers/rspec_spec.rb +7 -0
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 52e48c6e9eaad4ea695992466a5a726dc7a1e4b1
|
4
|
+
data.tar.gz: 8f75b0056fba808d7fbe54e72db0b17a3c7056a8
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 8e31b57f16b51787ab151d90f4a476b7a9923ac279aa7fd0d8101ac3bc548b5914b35e33caa7c5efe53dcebbfc61d7658cbc2797b3190f608b80c681ec6e7867
|
7
|
+
data.tar.gz: d2d54da9a515823092accf2b0e2c623bf7bfac9dbf2763263087885f19da32c73a7d68991b9940803c4fb242992f977e597b88290763fa5e6a48f7fad0a07c55
|
data/CHANGELOG.md
CHANGED
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.1.
|
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.
|
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-
|
11
|
+
date: 2013-07-26 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: facets
|