matest 1.6.2 → 1.6.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/lib/matest.rb +1 -0
- data/lib/matest/example_group.rb +0 -51
- data/lib/matest/skipped_example_group.rb +58 -0
- data/lib/matest/version.rb +1 -1
- metadata +3 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 757f28ddf171609ce80b736adeb1f5accd410436
|
4
|
+
data.tar.gz: ae5cbf1f29b8a645562602bcc1f6a5745e7b4703
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 875366326b041e3112a33032f02efefd1f7ba823ce85ec776a205deb00e26dd35633e47f55c8a56cfcadefb25fff7b50a289eee2c0e613b43617a2d7cb48e981
|
7
|
+
data.tar.gz: a03d705697f14ca9298290183d1c6343a566b111bcd69ca8457b1478ff7c5d966ae15b7b948530cc55e715200140910cef5b2aea651583b723f349d64ed42adc
|
data/lib/matest.rb
CHANGED
data/lib/matest/example_group.rb
CHANGED
@@ -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
|
data/lib/matest/version.rb
CHANGED
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.
|
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-
|
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
|