Kill mutations in Mutant::Result.included

This commit is contained in:
Markus Schirp 2015-09-08 16:55:34 +00:00
parent 104afe3bcf
commit 3874b3f11a

View file

@ -0,0 +1,23 @@
RSpec.describe Mutant::Result do
describe '.included' do
let(:object) do
Class.new do
include Mutant::Result
def collection
[[1]]
end
sum :length, :collection
end.new
end
it 'includes mixin to freeze instances' do
expect(object.frozen?).to be(true)
end
it 'it makes DSL methods from Mutant::Result available' do
expect(object.length).to be(1)
end
end
end