showcase 0.2.0.beta → 0.2.0.beta.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/showcase/traits/base.rb +4 -1
- data/lib/showcase/version.rb +1 -1
- data/spec/traits/base_spec.rb +16 -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: f4aca093a1d07f54759affb83a82874a4258fe27
|
4
|
+
data.tar.gz: 67868f88d0beb8c795dd29c6a8dc50204c723fab
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 6dcff3933067fde24764b43989f370c5fd36807626336d7e05690f8a61f78c3eb2afaba9e0274b8c064166db0b13a18aec896b27fe58a5cce5ef15d2c134c43f
|
7
|
+
data.tar.gz: dcbca1fc34cf5b1d66c32fd766ff0c311379a144bd74b3d5b1bd2a611caedf50f4753ad10d6129f67410976311bb119f41cfa1f0226acfa7f98e7e61a6662231
|
data/lib/showcase/traits/base.rb
CHANGED
data/lib/showcase/version.rb
CHANGED
data/spec/traits/base_spec.rb
CHANGED
@@ -15,6 +15,22 @@ module Showcase::Traits
|
|
15
15
|
expect(klass.new.foo).to be_true
|
16
16
|
end
|
17
17
|
|
18
|
+
it 'overriding the method allows to call super' do
|
19
|
+
klass = Class.new do
|
20
|
+
include Base
|
21
|
+
|
22
|
+
define_method? :foo do
|
23
|
+
true
|
24
|
+
end
|
25
|
+
|
26
|
+
def foo
|
27
|
+
super
|
28
|
+
end
|
29
|
+
end
|
30
|
+
|
31
|
+
expect(klass.new.foo).to be_true
|
32
|
+
end
|
33
|
+
|
18
34
|
context 'if the method is already present' do
|
19
35
|
it 'no-ops ' do
|
20
36
|
klass = Class.new do
|