Sha256: 19e2c12906ac7332da8320cb3170f7903528fef03c8d8545a9cc3a6ea2007ae3

Contents?: true

Size: 555 Bytes

Versions: 4

Compression:

Stored size: 555 Bytes

Contents

# frozen_string_literal: true

require_relative 'base'

module Spectus
  module RequirementLevel
    # Medium requirement level's class.
    #
    # @api private
    #
    class Medium < Base
      # Evaluate the expectation.
      #
      # @return [Result::Fail, Result::Pass] Report if the medium expectation
      #   pass or fail.
      def result(isolation = false)
        state = sandbox(isolation)

        if state.valid? || state.exception.nil?
          pass!(state)
        else
          fail!(state)
        end
      end
    end
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
spectus-3.0.10 lib/spectus/requirement_level/medium.rb
spectus-3.0.9 lib/spectus/requirement_level/medium.rb
spectus-3.0.8 lib/spectus/requirement_level/medium.rb
spectus-3.0.7 lib/spectus/requirement_level/medium.rb