a19f3b1691
* I do not use 1.9.3 * Also keeping them in each file increases mental overhead (true it *can* be autoamted) * None of the files encodes NON ASCII chars. * I do not expect it makes any difference, since nobody programmatically will consume strings generated by mutant under the assumption they are UTF-8 encoded. * 1.9.3 Users have to deal with the encoding fuckup under ruby anyways.
39 lines
712 B
Ruby
39 lines
712 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
|