uspec 1.1.1 → 1.1.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/uspec/dsl.rb +5 -2
- data/lib/uspec/version.rb +1 -1
- data/uspec/test_specs/method_spec +5 -2
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 659b5228eb82a76f457af1da9a275cfdcc5914f03d40083fdca08f79c8b1fac6
|
4
|
+
data.tar.gz: d89c4ee71c95dc202adf14110a140f9f4d667698f0e8b443a884226b6881e57d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 021b318bd832f4c5f290db67bca30a05e8e545fcc9b633506ab63ce2dc55cf53389885bc42d956e007f76d44245817aaa915f35f940b514eca43cbde32cc0c2a
|
7
|
+
data.tar.gz: 44f6373981caa474dbb6df5f48f9fcf38c9fc3d59f680e6198940f758c098f4157ce30dc6ad13294cb3bca99c7f659ca60395d5760b11830905144368ef5a8b0
|
data/lib/uspec/dsl.rb
CHANGED
@@ -5,7 +5,6 @@ module Uspec
|
|
5
5
|
USPEC_CLI_BLOCK = -> { @__uspec_dsl.__uspec_cli }
|
6
6
|
USPEC_STAT_BLOCK = -> { @__uspec_dsl.__uspec_cli.stats }
|
7
7
|
USPEC_SPEC_BLOCK = ->(description, &block) { @__uspec_dsl.spec description, &block }
|
8
|
-
USPEC_MM_BLOCK = ->(name, *args) { @__uspec_dsl.methods(false).include?(name) && @__uspec_dsl.send(name, *args) || super }
|
9
8
|
|
10
9
|
def initialize cli
|
11
10
|
@__uspec_cli = cli
|
@@ -27,10 +26,14 @@ module Uspec
|
|
27
26
|
o.instance_variable_set :@__uspec_dsl, self
|
28
27
|
o.define_singleton_method :spec, USPEC_SPEC_BLOCK
|
29
28
|
o.define_singleton_method :spec_block, &block
|
30
|
-
o.define_singleton_method :method_missing, USPEC_MM_BLOCK
|
31
29
|
self.instance_variables.each do |name|
|
32
30
|
o.instance_variable_set(name, self.instance_variable_get(name)) unless name.to_s.include? '@__uspec'
|
33
31
|
end
|
32
|
+
self.methods(false).each do |name|
|
33
|
+
o.define_singleton_method name do |*args, &block|
|
34
|
+
@__uspec_dsl.send name, *args, &block
|
35
|
+
end unless name.to_s.include? '__uspec'
|
36
|
+
end
|
34
37
|
o.spec_block
|
35
38
|
end
|
36
39
|
|
data/lib/uspec/version.rb
CHANGED