diff --git a/config/reek.yml b/config/reek.yml index c76d9366..a928b9e5 100644 --- a/config/reek.yml +++ b/config/reek.yml @@ -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 diff --git a/lib/mutant/integration.rb b/lib/mutant/integration.rb index b9919ac4..6ca91457 100644 --- a/lib/mutant/integration.rb +++ b/lib/mutant/integration.rb @@ -77,6 +77,23 @@ module Mutant EMPTY_ARRAY end + # Return report for test + # + # @param [Enumerable] 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 diff --git a/lib/mutant/integration/rspec.rb b/lib/mutant/integration/rspec.rb index 4d24c62b..2875cdcc 100644 --- a/lib/mutant/integration/rspec.rb +++ b/lib/mutant/integration/rspec.rb @@ -41,7 +41,7 @@ module Mutant # # @param [Enumerable] tests # - # @return [Test::Result] + # @return [Result::Test] # # @api private # diff --git a/spec/unit/mutant/integration_spec.rb b/spec/unit/mutant/integration_spec.rb index 35365637..490ed08b 100644 --- a/spec/unit/mutant/integration_spec.rb +++ b/spec/unit/mutant/integration_spec.rb @@ -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