|
8 | 8 | matchable_scopes: [],
|
9 | 9 | mutations: [],
|
10 | 10 | selector: selector,
|
11 |
| - subjects: [subject_a, subject_b], |
| 11 | + subjects: subjects, |
12 | 12 | parser: Mutant::Parser.new,
|
13 | 13 | world: world
|
14 | 14 | )
|
|
17 | 17 | let(:integration_class) { Mutant::Integration::Null }
|
18 | 18 | let(:isolation) { Mutant::Isolation::None.new }
|
19 | 19 | let(:kernel) { instance_double(Object, 'kernel') }
|
20 |
| - let(:subject_a) { instance_double(Mutant::Subject, :a) } |
21 |
| - let(:subject_b) { instance_double(Mutant::Subject, :b) } |
22 | 20 | let(:reporter) { instance_double(Mutant::Reporter) }
|
23 | 21 | let(:selector) { instance_double(Mutant::Selector) }
|
| 22 | + let(:subject_a) { instance_double(Mutant::Subject, :a) } |
| 23 | + let(:subject_b) { instance_double(Mutant::Subject, :b) } |
| 24 | + let(:subjects) { [subject_a, subject_b] } |
24 | 25 | let(:test_a) { instance_double(Mutant::Test, :a) }
|
25 | 26 | let(:test_b) { instance_double(Mutant::Test, :b) }
|
26 | 27 | let(:test_c) { instance_double(Mutant::Test, :c) }
|
@@ -190,10 +191,18 @@ def apply
|
190 | 191 | subject.test_subject_ratio
|
191 | 192 | end
|
192 | 193 |
|
193 |
| - let(:subjects) { [subject_a, instance_double(Mutant::Subject)] } |
| 194 | + context 'on empty subjects' do |
| 195 | + let(:subjects) { [] } |
194 | 196 |
|
195 |
| - it 'returns expected value' do |
196 |
| - expect(apply).to eql(Rational(3, 2)) |
| 197 | + it 'returns expected value' do |
| 198 | + expect(apply).to eql(Rational(0)) |
| 199 | + end |
| 200 | + end |
| 201 | + |
| 202 | + context 'on non empty subjects' do |
| 203 | + it 'returns expected value' do |
| 204 | + expect(apply).to eql(Rational(3, 2)) |
| 205 | + end |
197 | 206 | end
|
198 | 207 | end
|
199 | 208 |
|
|
0 commit comments