Fix null integration

This commit is contained in:
Markus Schirp 2015-01-24 23:12:15 +00:00
parent 168f8fe202
commit 3e76cdb96f
4 changed files with 37 additions and 2 deletions

View file

@ -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

View file

@ -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

View file

@ -41,7 +41,7 @@ module Mutant
#
# @param [Enumerable<Mutant::Test>] tests
#
# @return [Test::Result]
# @return [Result::Test]
#
# @api private
#

View file

@ -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