free_mutant/spec/integration/mutant/runner_spec.rb

27 lines
557 B
Ruby
Raw Normal View History

2012-08-14 16:45:34 -04:00
require 'spec_helper'
describe Mutant, 'runner' do
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
output = StringIO.new
runner = Mutant::Runner.run(
:pattern => /\ATestApp::/,
:killer => Mutant::Killer::Rspec,
: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)
2012-08-14 16:45:34 -04:00
end
end