Skip to content

Commit

Permalink
Kill mutations in Mutant::Result.included
Browse files Browse the repository at this point in the history
  • Loading branch information
mbj committed Sep 8, 2015
1 parent 104afe3 commit 3874b3f
Showing 1 changed file with 23 additions and 0 deletions.
23 changes: 23 additions & 0 deletions spec/unit/mutant/result_spec.rb
@@ -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

0 comments on commit 3874b3f

Please sign in to comment.