Sha256: 5466f85dd4abe653d4c4d8675196f62632ea2abe4cfaf1b9ffab8bbb406623c3

Contents?: true

Size: 1.15 KB

Versions: 13

Compression:

Stored size: 1.15 KB

Contents

RSpec.describe Mutant::Mutation do

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

  let(:object)  { TestMutation.new(mutation_subject, Mutant::AST::Nodes::N_NIL) }
  let(:context) { double('Context')                                             }

  let(:mutation_subject) do
    double(
      'Subject',
      identification: 'subject',
      context: context,
      source: 'original',
      tests:  tests
    )
  end

  let(:test_a) { double('Test A') }
  let(:test_b) { double('Test B') }
  let(:tests)  { [test_a, test_b] }

  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

13 entries across 13 versions & 1 rubygems

Version Path
mutant-0.8.7 spec/unit/mutant/mutation_spec.rb
mutant-0.8.6 spec/unit/mutant/mutation_spec.rb
mutant-0.8.5 spec/unit/mutant/mutation_spec.rb
mutant-0.8.4 spec/unit/mutant/mutation_spec.rb
mutant-0.8.3 spec/unit/mutant/mutation_spec.rb
mutant-0.8.2 spec/unit/mutant/mutation_spec.rb
mutant-0.8.1 spec/unit/mutant/mutation_spec.rb
mutant-0.8.0 spec/unit/mutant/mutation_spec.rb
mutant-0.7.9 spec/unit/mutant/mutation_spec.rb
mutant-0.7.8 spec/unit/mutant/mutation_spec.rb
mutant-0.7.7 spec/unit/mutant/mutation_spec.rb
mutant-0.7.6 spec/unit/mutant/mutation_spec.rb
mutant-0.7.5 spec/unit/mutant/mutation_spec.rb