Sha256: a4d81e1cae444b4be44646b62a3c04afa4072bb2a195eac9f4a24ed4cf655fce

Contents?: true

Size: 931 Bytes

Versions: 6

Compression:

Stored size: 931 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
              Classes::Results::BeSuccess.new(*args, **kwargs, &block)
            when :failure
              Classes::Results::BeFailure.new(*args, **kwargs, &block)
            when :error
              Classes::Results::BeError.new(*args, **kwargs, &block)
            when :not_success
              Classes::Results::BeNotSuccess.new(*args, **kwargs, &block)
            when :not_failure
              Classes::Results::BeNotFailure.new(*args, **kwargs, &block)
            when :not_error
              Classes::Results::BeNotError.new(*args, **kwargs, &block)
            end
          end
        end
      end
    end
  end
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
convenient_service-0.19.1 lib/convenient_service/rspec/matchers/results/be_result.rb
convenient_service-0.19.0 lib/convenient_service/rspec/matchers/results/be_result.rb
convenient_service-0.18.0 lib/convenient_service/rspec/matchers/results/be_result.rb
convenient_service-0.17.0 lib/convenient_service/rspec/matchers/results/be_result.rb
convenient_service-0.16.0 lib/convenient_service/rspec/matchers/results/be_result.rb
convenient_service-0.15.0 lib/convenient_service/rspec/matchers/results/be_result.rb