Sha256: fc6e47e5cb023ea4f07cb414273dcd6e5a8111b06f516d67ab362c732d2154cd

Contents?: true

Size: 1.01 KB

Versions: 4

Compression:

Stored size: 1.01 KB

Contents

require 'spec_helper'

describe Mutant::Mutation do

  class TestMutation < Mutant::Mutation
    SYMBOL = 'test'.freeze
  end

  let(:object)           { TestMutation.new(mutation_subject, Mutant::NodeHelpers::N_NIL)   }
  let(:mutation_subject) { double('Subject', identification: 'subject', source: 'original') }
  let(:node)             { double('Node')                                                   }

  describe '#code' do
    subject { object.code }

    it { should eql('8771a') }

    it_should_behave_like 'an idempotent method'
  end

  describe '#original_source' do
    subject { object.original_source }

    it { should eql('original') }

    it_should_behave_like 'an idempotent method'
  end

  describe '#source' do
    subject { object.source }

    it { should eql('nil') }

    it_should_behave_like 'an idempotent method'
  end

  describe '#identification' do

    subject { object.identification }

    it { should eql('test:subject:8771a') }

    it_should_behave_like 'an idempotent method'
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
mutant-0.5.23 spec/unit/mutant/mutation_spec.rb
mutant-0.5.22 spec/unit/mutant/mutation_spec.rb
mutant-0.5.21 spec/unit/mutant/mutation_spec.rb
mutant-0.5.20 spec/unit/mutant/mutation_spec.rb