Fix null integration
This commit is contained in:
parent
168f8fe202
commit
3e76cdb96f
4 changed files with 37 additions and 2 deletions
|
@ -127,6 +127,7 @@ UtilityFunction:
|
|||
- Mutant::Actor::Env#new_mailbox
|
||||
- Mutant::AST::Sexp#s
|
||||
- Mutant::CLI#reporter
|
||||
- Mutant::Integration::Null#call
|
||||
- Mutant::Integration::Rspec#parse_example
|
||||
- Mutant::Meta::Example::Verification#format_mutation
|
||||
- Mutant::Reporter::CLI::Format::Progressive#new_buffer
|
||||
|
|
|
@ -77,6 +77,23 @@ module Mutant
|
|||
EMPTY_ARRAY
|
||||
end
|
||||
|
||||
# Return report for test
|
||||
#
|
||||
# @param [Enumerable<Mutant::Test>] tests
|
||||
#
|
||||
# @return [Result::Test]
|
||||
#
|
||||
# @api private
|
||||
#
|
||||
def call(tests)
|
||||
Result::Test.new(
|
||||
tests: tests,
|
||||
output: '',
|
||||
runtime: 0.0,
|
||||
passed: true
|
||||
)
|
||||
end
|
||||
|
||||
end # Null
|
||||
|
||||
end # Integration
|
||||
|
|
|
@ -41,7 +41,7 @@ module Mutant
|
|||
#
|
||||
# @param [Enumerable<Mutant::Test>] tests
|
||||
#
|
||||
# @return [Test::Result]
|
||||
# @return [Result::Test]
|
||||
#
|
||||
# @api private
|
||||
#
|
||||
|
|
|
@ -16,11 +16,28 @@ RSpec.describe Mutant::Integration::Null do
|
|||
|
||||
let(:object) { described_class.new }
|
||||
|
||||
describe '#setup' do
|
||||
describe '#all_tests' do
|
||||
subject { object.all_tests }
|
||||
|
||||
it { should eql([]) }
|
||||
|
||||
it_should_behave_like 'an idempotent method'
|
||||
end
|
||||
|
||||
describe '#call' do
|
||||
let(:tests) { double('Tests') }
|
||||
|
||||
subject { object.call(tests) }
|
||||
|
||||
it 'returns test result' do
|
||||
should eql(
|
||||
Mutant::Result::Test.new(
|
||||
tests: tests,
|
||||
runtime: 0.0,
|
||||
passed: true,
|
||||
output: ''
|
||||
)
|
||||
)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Add table
Reference in a new issue