Sha256: 037ea844dc807152df56dbb9d91853804e7c36025b2cde7439594730ae8bf98e

Contents?: true

Size: 514 Bytes

Versions: 1

Compression:

Stored size: 514 Bytes

Contents

require_relative File.join '..', 'requirement'

module Spectus
  # Contains requirement levels.
  module RequirementLevel
    # _Medium_ requirement level.
    class Medium < Requirement
      # Evaluate the expectation with the passed block.
      #
      # @return [Boolean] report if the expectation is true or false.
      def pass?(&actual)
        result = sandbox(&actual)

        if result.pass?(@negate)
          true
        else
          result.exception.nil?
        end
      end
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
spectus-2.0.2 lib/spectus/requirement_level/medium.rb