free_mutant/spec/integration/mutant/rspec_killer_spec.rb
Dan Kubb 7293386c26 Add magic encoding header to all ruby files
* rubocop still warns about this on ruby 1.9.3, so it was fixed so
  it produces less output on travis.
2013-07-28 16:03:06 -07:00

29 lines
740 B
Ruby

# encoding: utf-8
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
cli = 'bundle exec mutant --rspec-dm2 ::TestApp::Literal#string'
Kernel.system(cli).should be(true)
end
specify 'fails to kill mutations when they are not covered' do
cli = 'bundle exec mutant --rspec-dm2 ::TestApp::Literal#uncovered_string'
Kernel.system(cli).should be(false)
end
specify 'fails when some mutations when are not covered' do
cli = 'bundle exec mutant --rspec-dm2 ::TestApp::Literal'
Kernel.system(cli).should be(false)
end
end