free_mutant/spec/unit/mutant/mutatee/reset_spec.rb
Markus Schirp d50ecc483d Cleanup missing whitespace after comma
* There must be a code metric tool helping me in converting my style.
2012-07-31 04:10:37 +02:00

26 lines
656 B
Ruby

require 'spec_helper'
describe Mutant::Mutatee, '#reset' do
subject { object.reset }
let(:object) { described_class.new(context, ast) }
let(:root) { mock('Root AST') }
let(:ast) { mock('AST') }
let(:context) { mock('Context', :root => root) }
it_should_behave_like 'a command method'
before do
Mutant::Loader.stub(:load => Mutant::Loader)
end
it 'should create root ast from context' do
context.should_receive(:root).with(ast).and_return(root)
should be(object)
end
it 'should insert root ast' do
Mutant::Loader.should_receive(:load).with(root).and_return(Mutant::Loader)
should be(object)
end
end