free_mutant/spec/unit/mutant/result_spec.rb
Markus Schirp 99ab9ff171 Change required Ruby version to >=2.3
* This commit does every 2.3 change required to get the build pass
* None of the changes can be extracted, without changing the build setup
2018-09-12 14:21:24 +00:00

33 lines
666 B
Ruby

# frozen_string_literal: true
RSpec.describe Mutant::Result do
let(:object) do
Class.new do
include Mutant::Result, Concord.new(:runtime, :killtime)
def collection
[[1]]
end
sum :length, :collection
end.new(3.0, 1.0)
end
describe '.included' do
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
describe '#overhead' do
subject { object.overhead }
it 'returns difference between runtime and killtime' do
should eql(2.0)
end
end
end