Sha256: f81c1d7920fa1cec90f67c3de69ea31e3e8b65f6d3432f685a16464809545b4e

Contents?: true

Size: 642 Bytes

Versions: 5

Compression:

Stored size: 642 Bytes

Contents

RSpec.describe Mutest::Result do
  let(:object) do
    Class.new do
      include Mutest::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 Mutest::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
      is_expected.to be(2.0)
    end
  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
mutest-0.0.6 spec/unit/mutest/result_spec.rb
mutest-0.0.5 spec/unit/mutest/result_spec.rb
mutest-0.0.4 spec/unit/mutest/result_spec.rb
mutest-0.0.3 spec/unit/mutest/result_spec.rb
mutest-0.0.2 spec/unit/mutest/result_spec.rb