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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: cb801d9f4456d3cfe7c0d08c3cb944f4ba7dd1a2760760314756474bca01269c
4
- data.tar.gz: 5321cad9b683f3f95cd681dab3c9177271c38f8e69bb80b7879a4e4bca31c837
3
+ metadata.gz: 659b5228eb82a76f457af1da9a275cfdcc5914f03d40083fdca08f79c8b1fac6
4
+ data.tar.gz: d89c4ee71c95dc202adf14110a140f9f4d667698f0e8b443a884226b6881e57d
5
5
  SHA512:
6
- metadata.gz: 91e01712aae2a1a5690b58075e9dcdfe9e86e67fc64baf5aca5f0e80c60a9a058812cd11e0412e6a8553f9ef9e5496120533871c3a07cf4eabf412fe7499f795
7
- data.tar.gz: '09ff01aa543dcc4b2951735642cdbb12a95bfb347f1ce112162f7666a08257fcbc026da9d043c071bc36c4a6e315c22e292b2e4fc1f9417f8005a4d833718582'
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
@@ -1,3 +1,3 @@
1
1
  module Uspec
2
- VERSION = '1.1.1'
2
+ VERSION = '1.1.2'
3
3
  end
@@ -1,7 +1,10 @@
1
- def a_method
1
+ def format
2
+ yield
2
3
  true
3
4
  end
4
5
 
5
6
  spec "method spec" do
6
- a_method
7
+ format do
8
+ false
9
+ end
7
10
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: uspec
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.1.1
4
+ version: 1.1.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Anthony M. Cook