totally_lazy 0.1.43 → 0.1.44

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,15 +1,15 @@
1
1
  ---
2
2
  !binary "U0hBMQ==":
3
3
  metadata.gz: !binary |-
4
- NDEyYjgxYzJmODdjODYwNjAxNzhjYzIwZjgwYjk4NzJiMzE2ZDQ3MA==
4
+ NzA2YmNiZDA0NWZiM2ZjZDc0OWU2OTQ2OTE0MzIzM2NhMmIxNGIxOQ==
5
5
  data.tar.gz: !binary |-
6
- MTllYWU0ODRkNTQ3NjlkMTJlNGRmYjI5ZTBiZjlkMmI4NDNiNDVhMQ==
6
+ ZTA2NmYxNGI4MGQzNjRkNjQwMzJiMDVjYzEzN2NkNzljYTI0YmM4ZQ==
7
7
  SHA512:
8
8
  metadata.gz: !binary |-
9
- ZjJiM2MxYzI0YjJmNWE3M2I3NmNjMTMyOGQwNWE0MjdmMDcyMDE5ZTE5N2Ix
10
- MTA4NDk3NWZlNDkxODMyODAyM2IzYmQzYmRkYzRmYWZmZGQ5MDRjNmVmNWU3
11
- MjBlMDZjYWZjMzgxMjE5Yjk2ZGY5OGE2MTJiZGVlOTMzMDJiNGI=
9
+ MTUzOGNhNmRkZjc4ZDdlNWYyNGQyNmY0NmNjMjlkZTFhMDM0OGJkZmU4YTI5
10
+ MmRhMmIxNmMwYjIxYjg4NjJlMjkyZGQ4MGUyYzg3Njg4ZDQxZGM2MTUzNGRh
11
+ NWU0Y2ZkZTk0ZTRjMDE4OWFkODM4ZDRlYzBlMTZmYzYwYjc3Njg=
12
12
  data.tar.gz: !binary |-
13
- ZmE1Y2JhZWQ2MjAxNTJjM2UzYjcwMzc4ZWExMjRmMjA1MjJjMDc5ZGZlNjlh
14
- N2YwMDgxYjRjNTFhNTE0OWNmZWFjOTY3OGZkMjliNDlmOTA1Zjg1M2YyNjQz
15
- NTgyYThhMTBlYzA2MDk5MDNhZmMwMTAzYTRkMTAwY2I5ZjlmYmE=
13
+ ZGVhNzkwODUwN2RhMmE2NjJkMDE5Yzc5ZWNiNjhmOGVlMjY4YWRiMTEzOTll
14
+ MWZlYzAyNzNjMzkxYzNkZTM1ZDI1NmIzY2YyZGU4MmM1NzA5ZTFmNDU3MzA5
15
+ OGJmMTc2MzNiMGIzMmU2NjMzODFjZjU4NmM3MzdjY2IzZDA4MTA=
@@ -15,4 +15,10 @@ module Predicates
15
15
  def matches?(regex)
16
16
  ->(value) { !regex.match(value).nil? }
17
17
  end
18
+
19
+ def equal_to?(that)
20
+ ->(this) { this == that }
21
+ end
22
+ alias is? equal_to?
23
+
18
24
  end
@@ -5,4 +5,10 @@ describe 'Predicates' do
5
5
  expect(sequence('Stacy').find(matches?(/Stac/))).to eq(some('Stacy'))
6
6
  expect(sequence('Raymond').find(matches?(/NotAwesome/))).to eq(none)
7
7
  end
8
+
9
+ it 'should allow is' do
10
+ expect(sequence('Stuff').find(is?('Stuff'))).to eq(some('Stuff'))
11
+ expect(sequence('Stuff').find(equal_to?('Stuff'))).to eq(some('Stuff'))
12
+ expect(sequence('Stuff').find(is?('Nothing'))).to eq(none)
13
+ end
8
14
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: totally_lazy
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.43
4
+ version: 0.1.44
5
5
  platform: ruby
6
6
  authors:
7
7
  - Raymond Barlow