Sha256: 2d2d2162bc2a1a9abcd5bc88656b4b0a83be0ce5f7610031e498d229e907f086

Contents?: true

Size: 533 Bytes

Versions: 1

Compression:

Stored size: 533 Bytes

Contents

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

module Spectus
  # Contains requirement levels.
  module RequirementLevel
    # _Low_ requirement level.
    class Low < 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.exception.class.equal?(::NoMethodError)
          true
        else
          result.pass?(@negate)
        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/low.rb