mal 0.0.1 → 0.0.2
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 +4 -4
- data/lib/mal.rb +6 -1
- data/mal.gemspec +2 -2
- data/spec/mal_spec.rb +12 -0
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: e9e34384af7d008d577ba4062c834b0bf5c8cedb
|
4
|
+
data.tar.gz: f47b158a59a3fd77b9013d63312101be8efc8e0f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a6665014e7b2ec843c58877678c9b4e8df1cc16c32cfed0619ec524e10df9158e2cd919d83fd9aa1a54b2331fc4ef3e65d3fe85378311ecd2c52151234c05ee4
|
7
|
+
data.tar.gz: ca145ca000f736042934203cca6a68fb6e5e7fb8da5a81e8ded06e350f03485254b14f2e1dca76585ad81de9a652d654e087a082f7855a3490ee0271743c45f6
|
data/lib/mal.rb
CHANGED
@@ -1,5 +1,5 @@
|
|
1
1
|
module Mal
|
2
|
-
VERSION = '0.0.
|
2
|
+
VERSION = '0.0.2'
|
3
3
|
|
4
4
|
class AnythingT
|
5
5
|
def ===(value)
|
@@ -211,5 +211,10 @@ module Mal
|
|
211
211
|
HashOfOnlyT.new(**keys_to_values)
|
212
212
|
end
|
213
213
|
|
214
|
+
# Just like it says: will match any value given to it
|
215
|
+
def Anything()
|
216
|
+
AnythingT.new
|
217
|
+
end
|
218
|
+
|
214
219
|
extend self
|
215
220
|
end
|
data/mal.gemspec
CHANGED
@@ -2,11 +2,11 @@
|
|
2
2
|
# DO NOT EDIT THIS FILE DIRECTLY
|
3
3
|
# Instead, edit Jeweler::Tasks in Rakefile, and run 'rake gemspec'
|
4
4
|
# -*- encoding: utf-8 -*-
|
5
|
-
# stub: mal 0.0.
|
5
|
+
# stub: mal 0.0.2 ruby lib
|
6
6
|
|
7
7
|
Gem::Specification.new do |s|
|
8
8
|
s.name = "mal"
|
9
|
-
s.version = "0.0.
|
9
|
+
s.version = "0.0.2"
|
10
10
|
|
11
11
|
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
12
12
|
s.require_paths = ["lib"]
|
data/spec/mal_spec.rb
CHANGED
@@ -218,4 +218,16 @@ describe 'Mal' do
|
|
218
218
|
end
|
219
219
|
end
|
220
220
|
|
221
|
+
describe 'Anything()' do
|
222
|
+
it 'has a reasonable inspect' do
|
223
|
+
expect(Anything().inspect).to eq('Anything()')
|
224
|
+
end
|
225
|
+
|
226
|
+
it 'matches truly anything' do
|
227
|
+
expect_match_of(Anything(), {})
|
228
|
+
expect_match_of(Anything(), self)
|
229
|
+
expect_match_of(Anything(), true)
|
230
|
+
expect_match_of(Anything(), false)
|
231
|
+
end
|
232
|
+
end
|
221
233
|
end
|