Refactor runner and fix integration spec
This commit is contained in:
parent
96beff82b9
commit
cd35a6dcc6
9 changed files with 49 additions and 74 deletions
|
|
@ -1,10 +1,6 @@
|
|||
require 'spec_helper'
|
||||
|
||||
describe Mutant, 'runner' do
|
||||
before do
|
||||
pending
|
||||
end
|
||||
|
||||
around do |example|
|
||||
Dir.chdir(TestApp.root) do
|
||||
example.run
|
||||
|
|
@ -14,13 +10,13 @@ describe Mutant, 'runner' do
|
|||
it 'allows to run mutant over a project' do
|
||||
output = StringIO.new
|
||||
runner = Mutant::Runner.run(
|
||||
:pattern => /\ATestApp::/,
|
||||
:killer => Mutant::Killer::Rspec,
|
||||
:matcher => Mutant::Matcher::ObjectSpace.new(/\ATestApp::/),
|
||||
:reporter => Mutant::Reporter::CLI.new(output)
|
||||
)
|
||||
runner.fail?.should be(true)
|
||||
runner.errors.size.should be(22)
|
||||
output.rewind
|
||||
output.lines.grep(/Mutation/).size.should be(22)
|
||||
output.lines.grep(/Mutant alive:/).size.should be(22)
|
||||
end
|
||||
end
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue