mutant-rspec 0.5.0 → 0.5.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/mutant/rspec/killer.rb +17 -2
- data/lib/mutant/rspec/strategy.rb +15 -1
- data/spec/unit/mutant/rspec/killer_spec.rb +2 -2
- metadata +12 -6
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 908a9f505d0063d97966ab94c257339583e3633f
|
4
|
+
data.tar.gz: 15a31463e9e7c6f129987bf4548e57cf430c3f40
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 1dc99f1d5ca8321e94c0d6cd924855aebc92f35beda3fbf902cac255615387e9df4895642897a1bb0653de8a874f94f229f9290212ba48d6689b3f54f9dafe42
|
7
|
+
data.tar.gz: 47f6bf02ffe9fca16ae1369d0c42f551d55bf31fd2b55ff1d4f43931c333aef314ea035b14af8894455ee6da054afc33eee9e15dfdc9bb06125554b7f8596f2d
|
data/lib/mutant/rspec/killer.rb
CHANGED
@@ -32,8 +32,6 @@ module Mutant
|
|
32
32
|
return false
|
33
33
|
end
|
34
34
|
|
35
|
-
reporter = RSpec::Core::Reporter.new
|
36
|
-
|
37
35
|
example_groups.each do |group|
|
38
36
|
return true unless group.run(reporter)
|
39
37
|
end
|
@@ -90,6 +88,23 @@ module Mutant
|
|
90
88
|
strategy.example_groups
|
91
89
|
end
|
92
90
|
|
91
|
+
# Choose and memoize RSpec reporter
|
92
|
+
#
|
93
|
+
# @return [RSpec::Core::Reporter]
|
94
|
+
#
|
95
|
+
# @api private
|
96
|
+
#
|
97
|
+
def reporter
|
98
|
+
reporter_class = RSpec::Core::Reporter
|
99
|
+
|
100
|
+
if strategy.rspec2?
|
101
|
+
reporter_class.new
|
102
|
+
else
|
103
|
+
reporter_class.new(strategy.configuration)
|
104
|
+
end
|
105
|
+
end
|
106
|
+
memoize :reporter, freezer: :noop
|
107
|
+
|
93
108
|
end # Killer
|
94
109
|
end # Rspec
|
95
110
|
end # Mutant
|
@@ -46,6 +46,20 @@ module Mutant
|
|
46
46
|
world.example_groups
|
47
47
|
end
|
48
48
|
|
49
|
+
# Detect RSpec 2
|
50
|
+
#
|
51
|
+
# @return [true]
|
52
|
+
# when RSpec 2
|
53
|
+
#
|
54
|
+
# @return [false]
|
55
|
+
# otherwise
|
56
|
+
#
|
57
|
+
# @api private
|
58
|
+
#
|
59
|
+
def rspec2?
|
60
|
+
RSpec::Core::Version::STRING.start_with?('2.')
|
61
|
+
end
|
62
|
+
|
49
63
|
private
|
50
64
|
|
51
65
|
# Return world
|
@@ -67,7 +81,7 @@ module Mutant
|
|
67
81
|
#
|
68
82
|
def options
|
69
83
|
options = RSpec::Core::ConfigurationOptions.new(%w(--fail-fast spec))
|
70
|
-
options.parse_options
|
84
|
+
options.parse_options if rspec2?
|
71
85
|
options
|
72
86
|
end
|
73
87
|
memoize :options, freezer: :noop
|
@@ -42,7 +42,7 @@ describe Mutant::Rspec::Killer, '.new' do
|
|
42
42
|
context 'when run exits zero' do
|
43
43
|
let(:exit_status) { 0 }
|
44
44
|
|
45
|
-
|
45
|
+
it { expect(subject.killed?).to be(false) }
|
46
46
|
|
47
47
|
it { should be_a(described_class) }
|
48
48
|
end
|
@@ -50,7 +50,7 @@ describe Mutant::Rspec::Killer, '.new' do
|
|
50
50
|
context 'when run exits nonzero' do
|
51
51
|
let(:exit_status) { 1 }
|
52
52
|
|
53
|
-
|
53
|
+
it { expect(subject.killed?).to be(true) }
|
54
54
|
|
55
55
|
it { should be_a(described_class) }
|
56
56
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: mutant-rspec
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.5.
|
4
|
+
version: 0.5.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Markus Schirp
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-03-
|
11
|
+
date: 2014-03-05 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: mutant
|
@@ -16,28 +16,34 @@ dependencies:
|
|
16
16
|
requirements:
|
17
17
|
- - ~>
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version: 0.5.
|
19
|
+
version: 0.5.3
|
20
20
|
type: :runtime
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
24
|
- - ~>
|
25
25
|
- !ruby/object:Gem::Version
|
26
|
-
version: 0.5.
|
26
|
+
version: 0.5.3
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: rspec-core
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
30
30
|
requirements:
|
31
|
-
- -
|
31
|
+
- - '>='
|
32
32
|
- !ruby/object:Gem::Version
|
33
33
|
version: 2.14.1
|
34
|
+
- - <=
|
35
|
+
- !ruby/object:Gem::Version
|
36
|
+
version: 3.0.0.beta2
|
34
37
|
type: :runtime
|
35
38
|
prerelease: false
|
36
39
|
version_requirements: !ruby/object:Gem::Requirement
|
37
40
|
requirements:
|
38
|
-
- -
|
41
|
+
- - '>='
|
39
42
|
- !ruby/object:Gem::Version
|
40
43
|
version: 2.14.1
|
44
|
+
- - <=
|
45
|
+
- !ruby/object:Gem::Version
|
46
|
+
version: 3.0.0.beta2
|
41
47
|
- !ruby/object:Gem::Dependency
|
42
48
|
name: bundler
|
43
49
|
requirement: !ruby/object:Gem::Requirement
|