free_mutant/spec/integration/mutant/rspec_killer_spec.rb

32 lines
790 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
specify 'allows to run rspec with mutations' do
Mutant::Matcher::Method.parse('TestApp::Literal#string').each do |subject|
subject.each do |mutation|
Mutant::Killer::Rspec.nest do
runner = Mutant::Killer::Rspec.run(subject,mutation)
2012-08-14 22:45:34 +02:00
runner.fail?.should be(false)
end
end
end
Mutant::Matcher::Method.parse('TestApp::Literal#uncovered_string').each do |subject|
subject.each do |mutation|
Mutant::Killer::Rspec.nest do
runner = Mutant::Killer::Rspec.run(subject,mutation)
2012-08-14 22:45:34 +02:00
runner.fail?.should be(true)
end
end
end
end
end