2012-08-14 16:45:34 -04:00
|
|
|
require 'spec_helper'
|
|
|
|
|
|
|
|
describe Mutant, 'runner' do
|
2012-09-15 17:04:10 -04:00
|
|
|
before do
|
|
|
|
pending
|
|
|
|
end
|
|
|
|
|
2012-08-14 16:45:34 -04:00
|
|
|
around do |example|
|
|
|
|
Dir.chdir(TestApp.root) do
|
|
|
|
example.run
|
|
|
|
end
|
|
|
|
end
|
|
|
|
|
|
|
|
it 'allows to run mutant over a project' do
|
2012-08-16 13:10:24 -04:00
|
|
|
output = StringIO.new
|
2012-08-15 22:10:54 -04:00
|
|
|
runner = Mutant::Runner.run(
|
|
|
|
:pattern => /\ATestApp::/,
|
|
|
|
:killer => Mutant::Killer::Rspec,
|
2012-08-16 13:10:24 -04:00
|
|
|
:reporter => Mutant::Reporter::CLI.new(output)
|
2012-08-15 22:10:54 -04:00
|
|
|
)
|
|
|
|
runner.fail?.should be(true)
|
2012-08-16 13:10:24 -04:00
|
|
|
runner.errors.size.should be(22)
|
|
|
|
output.rewind
|
2012-08-20 11:55:22 -04:00
|
|
|
output.lines.grep(/Mutation/).size.should be(22)
|
2012-08-14 16:45:34 -04:00
|
|
|
end
|
|
|
|
end
|