Sha256: 95c6d74727526bc103c1687c762a38b4b1457b0ade0462af7100a2c9b661be34

Contents?: true

Size: 911 Bytes

Versions: 6

Compression:

Stored size: 911 Bytes

Contents

# frozen_string_literal: true

module ConvenientService
  module RSpec
    module Matchers
      module Custom
        module Results
          class Base
            module Errors
              class InvalidStep < ConvenientService::Error
                def initialize(step:)
                  message = <<~TEXT
                    Step `#{step}` is NOT valid.

                    `of_step` only accepts a Class or a Symbol. For example:

                    be_success.of_step(ReadFileContent)
                    be_success.of_step(:validate_path)
                    be_success.of_step(:result)

                    If you need to confirm that `result` has NO step - use `without_step` instead.

                    be_success.without_step
                  TEXT

                  super(message)
                end
              end
            end
          end
        end
      end
    end
  end
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
convenient_service-0.11.0 lib/convenient_service/rspec/matchers/custom/results/base/errors.rb
convenient_service-0.10.1 lib/convenient_service/rspec/matchers/custom/results/base/errors.rb
convenient_service-0.10.0 lib/convenient_service/rspec/matchers/custom/results/base/errors.rb
convenient_service-0.9.0 lib/convenient_service/rspec/matchers/custom/results/base/errors.rb
convenient_service-0.8.0 lib/convenient_service/rspec/matchers/custom/results/base/errors.rb
convenient_service-0.7.0 lib/convenient_service/rspec/matchers/custom/results/base/errors.rb