Sha256: b4a2650fd369e7033f14c28c7e375eea3d61bbdcdae4be2ae7a4c2de491cb609

Contents?: true

Size: 913 Bytes

Versions: 1

Compression:

Stored size: 913 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

1 entries across 1 versions & 1 rubygems

Version Path
convenient_service-0.12.0 lib/convenient_service/rspec/matchers/custom/results/base/errors.rb