Sha256: 77c950785c2339e7ecb7340399df462547ecb43b20be2920a121240df987b019

Contents?: true

Size: 683 Bytes

Versions: 2

Compression:

Stored size: 683 Bytes

Contents

require_relative 'base'

module Spectus
  module Result
    # The class that is responsible for reporting that the expectation is true.
    class Pass
      include Base

      # @!attribute [r] message
      #
      # @return [String] The message that describe the state.
      attr_reader :message

      # The value of the expectation of the spec.
      #
      # @return [Boolean] the spec was true.
      def result?
        true
      end

      # Identify the state of the result.
      #
      # @return [String] the char that identify the state of the result.
      def to_char
        if got
          '.'
        else
          'I'
        end
      end
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
spectus-2.3.1 lib/spectus/result/pass.rb
spectus-2.3.0 lib/spectus/result/pass.rb