spec/unit/mutant/env_spec.rb in mutant-0.8.0 vs spec/unit/mutant/env_spec.rb in mutant-0.8.1

- old
+ new

@@ -6,30 +6,30 @@ actor_env: Mutant::Actor::Env.new(Thread), cache: Mutant::Cache.new, selector: selector, subjects: [], mutations: [], - matchable_scopes: [] + matchable_scopes: [], + integration: integration ) end + let(:integration) { integration_class.new(config) } + let(:config) do - Mutant::Config::DEFAULT.update( - isolation: isolation, - integration: integration - ) + Mutant::Config::DEFAULT.update(isolation: isolation, integration: integration_class) end - let(:integration) { double('Integration') } - let(:isolation) { double('Isolation') } - let(:mutation) { Mutant::Mutation::Evil.new(mutation_subject, Mutant::AST::Nodes::N_NIL) } - let(:wrapped_node) { double('Wrapped Node') } - let(:context) { double('Context') } - let(:test_a) { double('Test A') } - let(:test_b) { double('Test B') } - let(:tests) { [test_a, test_b] } - let(:selector) { double('Selector') } + let(:isolation) { double('Isolation') } + let(:mutation) { Mutant::Mutation::Evil.new(mutation_subject, Mutant::AST::Nodes::N_NIL) } + let(:wrapped_node) { double('Wrapped Node') } + let(:context) { double('Context') } + let(:test_a) { double('Test A') } + let(:test_b) { double('Test B') } + let(:tests) { [test_a, test_b] } + let(:selector) { double('Selector') } + let(:integration_class) { Mutant::Integration::Null } let(:mutation_subject) do double( 'Subject', identification: 'subject', @@ -57,10 +57,9 @@ expect(isolation).to receive(:call).and_yield.and_return(test_result) expect(mutation_subject).to receive(:public?).and_return(true).ordered expect(mutation_subject).to receive(:prepare).and_return(mutation_subject).ordered expect(context).to receive(:root).with(s(:nil)).and_return(wrapped_node).ordered expect(Mutant::Loader::Eval).to receive(:call).with(wrapped_node, mutation_subject).and_return(nil).ordered - expect(integration).to receive(:call).with(tests).and_return(test_result).ordered end include_examples 'mutation kill' end