Sha256: 1ffff229efd36b6494fbe4351a59b05feb6894cbf4407a52f352300d3843a78a

Contents?: true

Size: 1.02 KB

Versions: 5

Compression:

Stored size: 1.02 KB

Contents

# encoding: utf-8

require 'spec_helper'

describe Mutant::Mutation do

  class TestMutation < Mutant::Mutation
    SYMBOL = 'test'
  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

5 entries across 5 versions & 1 rubygems

Version Path
mutant-0.5.17 spec/unit/mutant/mutation_spec.rb
mutant-0.5.16 spec/unit/mutant/mutation_spec.rb
mutant-0.5.15 spec/unit/mutant/mutation_spec.rb
mutant-0.5.14 spec/unit/mutant/mutation_spec.rb
mutant-0.5.13 spec/unit/mutant/mutation_spec.rb