Sha256: 1ea879c721ad5a8207ffd2bf0499f4f29d7dea8bbfe6cff6e2e71b72be805cde

Contents?: true

Size: 925 Bytes

Versions: 1

Compression:

Stored size: 925 Bytes

Contents

# frozen_string_literal: true

module ConvenientService
  module RSpec
    module Matchers
      module Results
        module BeResult
          ##
          # @api public
          #
          def be_result(status, *args, **kwargs, &block)
            case status
            when :success
              Custom::Results::BeSuccess.new(*args, **kwargs, &block)
            when :failure
              Custom::Results::BeFailure.new(*args, **kwargs, &block)
            when :error
              Custom::Results::BeError.new(*args, **kwargs, &block)
            when :not_success
              Custom::Results::BeNotSuccess.new(*args, **kwargs, &block)
            when :not_failure
              Custom::Results::BeNotFailure.new(*args, **kwargs, &block)
            when :not_error
              Custom::Results::BeNotError.new(*args, **kwargs, &block)
            end
          end
        end
      end
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
convenient_service-0.14.0 lib/convenient_service/rspec/matchers/results/be_result.rb