free_mutant/spec/unit/mutant/subject_spec.rb
Markus Schirp 49b09eeeac Fix rubocop reported issues
It will take ages till my brain produces 1.9 style syntax :D
2013-09-14 01:17:14 +02:00

39 lines
713 B
Ruby

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