free_mutant/spec/integration/mutant/rspec_killer_spec.rb
Markus Schirp 42e6fe84e5 Add runner with reporter
* Use MethodObject mixin
* Rename Context::Constant to Context::Scope
* Use Mutation class instead of passing around raw nodes
2012-08-16 04:10:54 +02:00

29 lines
704 B
Ruby

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|
runner = Mutant::Killer::Rspec.run(mutation)
runner.fail?.should be(false)
end
subject.reset
end
Mutant::Matcher::Method.parse('TestApp::Literal#uncovered_string').each do |subject|
subject.each do |mutation|
runner = Mutant::Killer::Rspec.run(mutation)
runner.fail?.should be(true)
end
subject.reset
end
end
end