matest 1.6.2 → 1.6.3

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: 2daca4d267143ef3fcf29ab0f7aa428f9c68e3c6
4
- data.tar.gz: 81fc1a71724139e129f8fc027932bf0930f14259
3
+ metadata.gz: 757f28ddf171609ce80b736adeb1f5accd410436
4
+ data.tar.gz: ae5cbf1f29b8a645562602bcc1f6a5745e7b4703
5
5
  SHA512:
6
- metadata.gz: 8c6d0f0ed1082347f1109a83b28cacd38c3e2e6bc7f0e0cd9493fe107ec31260638482ed162ae3d053d290714f3bf4844129a3f68943c678c327a40d24b056ad
7
- data.tar.gz: 930b85be27691aa152c5c6a4f22fac5fcbddf145343085c610b0cc3c5aa2db38bc26ca2b3daa8344bc1fd122c940d292817a310d9980e5238e8602b049ea7500
6
+ metadata.gz: 875366326b041e3112a33032f02efefd1f7ba823ce85ec776a205deb00e26dd35633e47f55c8a56cfcadefb25fff7b50a289eee2c0e613b43617a2d7cb48e981
7
+ data.tar.gz: a03d705697f14ca9298290183d1c6343a566b111bcd69ca8457b1478ff7c5d966ae15b7b948530cc55e715200140910cef5b2aea651583b723f349d64ed42adc
@@ -4,6 +4,7 @@ require "matest/configure"
4
4
  require "matest/color"
5
5
  require "matest/runner"
6
6
  require "matest/example_group"
7
+ require "matest/skipped_example_group"
7
8
  require "matest/example"
8
9
  require "matest/example_block"
9
10
  require "matest/let"
@@ -1,55 +1,4 @@
1
1
  module Matest
2
- class SkippedExampleGroup
3
- attr_reader :scope_block
4
-
5
- attr_accessor :printer
6
- attr_reader :specs
7
- attr_reader :statuses
8
-
9
- def initialize(scope_block)
10
- @scope_block = scope_block
11
- @specs = []
12
- @statuses = []
13
- end
14
-
15
- def execute!
16
- instance_eval(&scope_block)
17
- specs.each do |spec|
18
- res = run_spec(spec)
19
- printer.print(res)
20
- end
21
- end
22
-
23
- def run_spec(spec)
24
- status = Matest::SpecSkipped.new(spec, true)
25
- @statuses << status
26
- status
27
- end
28
-
29
- def scope(description=nil, &block)
30
- Matest::Runner.runner << Matest::SkippedExampleGroup.new(block)
31
- end
32
- alias :xscope :scope
33
- alias :describe :scope
34
- alias :xdescribe :xscope
35
-
36
- alias :context :scope
37
- alias :xcontext :xscope
38
-
39
- alias :group :scope
40
- alias :xgroup :xscope
41
-
42
- def spec(description=nil, &block)
43
- current_example = ->(*args) { Matest::SkipMe.new }
44
- specs << Example.new(current_example, description, [])
45
- end
46
- alias :xspec :spec
47
- alias :example :spec
48
- alias :xexample :spec
49
- alias :it :spec
50
- alias :xit :spec
51
- end
52
-
53
2
  class ExampleGroup
54
3
  attr_reader :scope_block
55
4
  attr_reader :specs
@@ -0,0 +1,58 @@
1
+ module Matest
2
+ class SkippedExampleGroup
3
+ attr_reader :scope_block
4
+
5
+ attr_accessor :printer
6
+ attr_reader :specs
7
+ attr_reader :statuses
8
+
9
+ def initialize(scope_block)
10
+ @scope_block = scope_block
11
+ @specs = []
12
+ @statuses = []
13
+ end
14
+
15
+ def execute!
16
+ instance_eval(&scope_block)
17
+ specs.each do |spec|
18
+ res = run_spec(spec)
19
+ printer.print(res)
20
+ end
21
+ end
22
+
23
+ def run_spec(spec)
24
+ status = Matest::SpecSkipped.new(spec, true)
25
+ @statuses << status
26
+ status
27
+ end
28
+
29
+ def let(*args)
30
+ end
31
+
32
+ def let!(*args)
33
+ end
34
+
35
+ def scope(description=nil, &block)
36
+ Matest::Runner.runner << Matest::SkippedExampleGroup.new(block)
37
+ end
38
+ alias :xscope :scope
39
+ alias :describe :scope
40
+ alias :xdescribe :xscope
41
+
42
+ alias :context :scope
43
+ alias :xcontext :xscope
44
+
45
+ alias :group :scope
46
+ alias :xgroup :xscope
47
+
48
+ def spec(description=nil, &block)
49
+ current_example = ->(*args) { Matest::SkipMe.new }
50
+ specs << Example.new(current_example, description, [])
51
+ end
52
+ alias :xspec :spec
53
+ alias :example :spec
54
+ alias :xexample :spec
55
+ alias :it :spec
56
+ alias :xit :spec
57
+ end
58
+ end
@@ -1,3 +1,3 @@
1
1
  module Matest
2
- VERSION = "1.6.2"
2
+ VERSION = "1.6.3"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: matest
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.6.2
4
+ version: 1.6.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Federico Iachetti
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-03-15 00:00:00.000000000 Z
11
+ date: 2015-03-16 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -91,6 +91,7 @@ files:
91
91
  - lib/matest/let.rb
92
92
  - lib/matest/runner.rb
93
93
  - lib/matest/skip_me.rb
94
+ - lib/matest/skipped_example_group.rb
94
95
  - lib/matest/spec_printer.rb
95
96
  - lib/matest/spec_status.rb
96
97
  - lib/matest/spec_tasks.rb