Sha256: d1a1ce192178cc538c7e0091b60c881f70f0e6c5c3f717a994d1ba0ce86aa4a6

Contents?: true

Size: 770 Bytes

Versions: 2

Compression:

Stored size: 770 Bytes

Contents

require 'spec_helper'

describe Mutant do
  describe '.run' do
    it 'runs the RSpec runner with the given arguments' do
      Mutant::Runners::RSpec.should_receive(:run).with(:foo)
      Mutant.run(:foo)
    end
  end

  describe '.mutate' do
    context 'given an implementation' do
      let(:mutatee) { double('mutatee') }
      let(:implementation) { double('implementation') }
      let(:mutator) { double('mutator') }

      before do
        mutator.should_receive(:mutate)
        implementation.should_receive(:mutatees).and_return([mutatee])
      end

      it "mutates each of the implementation's mutatees" do
        Mutant::Mutator.should_receive(:new).with(mutatee).and_return(mutator)
        Mutant.mutate(implementation)
      end
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
mutant-0.1.1 spec/mutant_spec.rb
mutant-0.1.0 spec/mutant_spec.rb