Kill mutations in Mutant::Result.included
This commit is contained in:
parent
104afe3bcf
commit
3874b3f11a
1 changed files with 23 additions and 0 deletions
23
spec/unit/mutant/result_spec.rb
Normal file
23
spec/unit/mutant/result_spec.rb
Normal 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
|
Loading…
Add table
Reference in a new issue