Sha256: 9df04b898074624c536bebbb57fe9e2d6566dec846dbb1c4b77624fba489494f

Contents?: true

Size: 593 Bytes

Versions: 14

Compression:

Stored size: 593 Bytes

Contents

# frozen_string_literal: true

RSpec.describe Mutant::Isolation::None do
  describe '.call' do
    let(:object) { described_class.new }

    context 'without exception' do
      it 'returns success result' do
        expect(object.call { :foo })
          .to eql(Mutant::Isolation::Result::Success.new(:foo))
      end
    end

    context 'with exception' do
      let(:exception) { RuntimeError.new('foo') }

      it 'returns error result' do
        expect(object.call { fail exception })
          .to eql(Mutant::Isolation::Result::Exception.new(exception))
      end
    end
  end
end

Version data entries

14 entries across 14 versions & 1 rubygems

Version Path
mutant-0.9.11 spec/unit/mutant/isolation/none_spec.rb
mutant-0.9.10 spec/unit/mutant/isolation/none_spec.rb
mutant-0.9.9 spec/unit/mutant/isolation/none_spec.rb
mutant-0.9.8 spec/unit/mutant/isolation/none_spec.rb
mutant-0.9.7 spec/unit/mutant/isolation/none_spec.rb
mutant-0.9.6 spec/unit/mutant/isolation/none_spec.rb
mutant-0.9.5 spec/unit/mutant/isolation/none_spec.rb
mutant-0.9.4 spec/unit/mutant/isolation/none_spec.rb
mutant-0.9.3 spec/unit/mutant/isolation/none_spec.rb
mutant-0.9.2 spec/unit/mutant/isolation/none_spec.rb
mutant-0.9.1 spec/unit/mutant/isolation/none_spec.rb
mutant-0.9.0 spec/unit/mutant/isolation/none_spec.rb
mutant-0.8.24 spec/unit/mutant/isolation/none_spec.rb
mutant-0.8.23 spec/unit/mutant/isolation/none_spec.rb