free_mutant/spec/integration/mutant/rspec_killer_spec.rb

25 lines
678 B
Ruby
Raw Normal View History

require 'spec_helper'
describe Mutant,'rspec integration' do
around do |example|
Dir.chdir(TestApp.root) do
example.run
end
end
let(:strategy) { Mutant::Strategy::Rspec::DM2 }
specify 'allows to kill mutations' do
Kernel.system('bundle exec mutant --rspec-dm2 ::TestApp::Literal#string').should be(true)
end
specify 'fails to kill mutations when they are not covered' do
Kernel.system('bundle exec mutant --rspec-dm2 ::TestApp::Literal#uncovered_string').should be(false)
end
2012-11-24 11:39:27 -05:00
specify 'fails when some mutations when are not covered' do
Kernel.system('bundle exec mutant --rspec-dm2 ::TestApp::Literal').should be(false)
2012-11-24 11:39:27 -05:00
end
end