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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 3abceb896eb37c725738c997b0bddcb09e74605b
4
- data.tar.gz: 8ad7e9cd6cc06b41bf2008f1e25a4116eed1e80f
3
+ metadata.gz: f4aca093a1d07f54759affb83a82874a4258fe27
4
+ data.tar.gz: 67868f88d0beb8c795dd29c6a8dc50204c723fab
5
5
  SHA512:
6
- metadata.gz: 1ff5470207bd67524b1de59fa28e4bc9970c2488ed9df89392a8630f939e1f0d5bea6445528cbfbf9e9f3c631b4765f001cd4acccd45208c217fbf8978583ba0
7
- data.tar.gz: 1454964cabb2b9f4be47fee3d041a3f3cdcbe061375a29de485d96bb10ae564c23100ea06643c92bcda3589f692f1ce74e0fa5b3356746b2c2676ad8f4c080fa
6
+ metadata.gz: 6dcff3933067fde24764b43989f370c5fd36807626336d7e05690f8a61f78c3eb2afaba9e0274b8c064166db0b13a18aec896b27fe58a5cce5ef15d2c134c43f
7
+ data.tar.gz: dcbca1fc34cf5b1d66c32fd766ff0c311379a144bd74b3d5b1bd2a611caedf50f4753ad10d6129f67410976311bb119f41cfa1f0226acfa7f98e7e61a6662231
@@ -11,7 +11,10 @@ module Showcase
11
11
  if method_defined?(method_name)
12
12
  false
13
13
  else
14
- define_method(method_name, &block)
14
+ method_module = Module.new do
15
+ define_method(method_name, &block)
16
+ end
17
+ include(method_module)
15
18
  true
16
19
  end
17
20
  end
@@ -1,4 +1,4 @@
1
1
  module Showcase
2
- VERSION = "0.2.0.beta"
2
+ VERSION = "0.2.0.beta.1"
3
3
  end
4
4
 
@@ -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
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: showcase
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.0.beta
4
+ version: 0.2.0.beta.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Stefano Verna