Sha256: 22a260abbfceace7ec9e46568e04781ee1a03ef936598278fc4f117bdbccfba9

Contents?: true

Size: 731 Bytes

Versions: 16

Compression:

Stored size: 731 Bytes

Contents

# encoding: utf-8

require 'spec_helper'

describe Mutant::Subject do
  let(:class_under_test) do
    Class.new(described_class) do
      def match_expression
        'match'
      end
    end
  end

  let(:object) { class_under_test.new(context, node) }

  let(:node) do
    double('Node', location: location)
  end

  let(:location) do
    double('Location', expression: expression)
  end

  let(:expression) do
    double('Expression', line: 'source_line')
  end

  let(:context) do
    double(
      'Context',
      source_path: 'source_path',
      source_line: 'source_line'
    )
  end

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

    it { should eql('match:source_path:source_line') }
  end
end

Version data entries

16 entries across 16 versions & 1 rubygems

Version Path
mutant-0.5.19 spec/unit/mutant/subject_spec.rb
mutant-0.5.18 spec/unit/mutant/subject_spec.rb
mutant-0.5.17 spec/unit/mutant/subject_spec.rb
mutant-0.5.16 spec/unit/mutant/subject_spec.rb
mutant-0.5.15 spec/unit/mutant/subject_spec.rb
mutant-0.5.14 spec/unit/mutant/subject_spec.rb
mutant-0.5.13 spec/unit/mutant/subject_spec.rb
mutant-0.5.12 spec/unit/mutant/subject_spec.rb
mutant-0.5.11 spec/unit/mutant/subject_spec.rb
mutant-0.5.10 spec/unit/mutant/subject_spec.rb
mutant-0.5.9 spec/unit/mutant/subject_spec.rb
mutant-0.5.8 spec/unit/mutant/subject_spec.rb
mutant-0.5.7 spec/unit/mutant/subject_spec.rb
mutant-0.5.6 spec/unit/mutant/subject_spec.rb
mutant-0.5.5 spec/unit/mutant/subject_spec.rb
mutant-0.5.4 spec/unit/mutant/subject_spec.rb