totally_lazy 0.1.33 → 0.1.34
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +8 -8
- data/spec/totally_lazy/either_spec.rb +5 -0
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,15 +1,15 @@
|
|
1
1
|
---
|
2
2
|
!binary "U0hBMQ==":
|
3
3
|
metadata.gz: !binary |-
|
4
|
-
|
4
|
+
NmNmMjExNjM2Njc1MzhhZmYzMzRlNmEwMGUyY2NmMzkwNDIwMDhlYg==
|
5
5
|
data.tar.gz: !binary |-
|
6
|
-
|
6
|
+
ZTRhNzk4N2I1MTFiM2E3NjQ0NmI5NzBmNWU4OWI1ZTBjNWIyN2ZiOQ==
|
7
7
|
SHA512:
|
8
8
|
metadata.gz: !binary |-
|
9
|
-
|
10
|
-
|
11
|
-
|
9
|
+
MzRjOGYzOGI5YTEzM2UyZDU4YTM4MGMyNTRkZjk4NjQ3Y2IwZDY1NjRlZWYw
|
10
|
+
N2UzYmI1ZGEwZjAwN2MwZWNkY2I3N2I4OGQ2NTZhYzZhYjJiMzZkNDI3OTJm
|
11
|
+
NzQ3NzUzMGYxOWM1YmRjNDdlMjJkM2MzODQxY2M2MWU3ZTg1NDg=
|
12
12
|
data.tar.gz: !binary |-
|
13
|
-
|
14
|
-
|
15
|
-
|
13
|
+
MTQyNzQzM2M3NzZmMTQwYjQ3Y2JmMjQyMDRjNWY3ODdiMmU5ZTE0OGU2N2M4
|
14
|
+
OWM3ZjhmYTMxZmY5ZjRkZTU3NTdjZjM0Y2RmMjJkNTBkMzc0ZTNlZjg1ZDU1
|
15
|
+
MzdiZmYzOWZmNjI3MjQ4YzVkMTUxMWFiNTBmZjQxZWE2ZTVmOWE=
|
@@ -65,6 +65,11 @@ describe 'Either' do
|
|
65
65
|
expect(some('bar').map(as_right).get).to eq(right('bar'))
|
66
66
|
end
|
67
67
|
|
68
|
+
it 'should not support getting left from right or right from left' do
|
69
|
+
expect { left('foo').right_value }.to raise_error(NoSuchElementException)
|
70
|
+
expect { right('foo').left_value }.to raise_error(NoSuchElementException)
|
71
|
+
end
|
72
|
+
|
68
73
|
it 'should raise exception if you try to use both lambda and block' do
|
69
74
|
expect { right(1).map(add(2)) { |a| a+2 } }.to raise_error(RuntimeError)
|
70
75
|
expect { right(1).map_left(add(2)) { |a| a+2 } }.to raise_error(RuntimeError)
|