Sha256: e10cba19dcbcbe5cb3ea712a32461310d81f2e301bbae3a3982b2ec1a842e4ec

Contents?: true

Size: 957 Bytes

Versions: 83

Compression:

Stored size: 957 Bytes

Contents

# frozen_string_literal: true

require 'bolt/result'
require 'bolt/util'

module BoltSpec
  module Plans
    class PublishStub < ActionStub
      def return
        raise "return is not implemented for out_message"
      end

      def return_for_targets(_data)
        raise "return_for_targets is not implemented for out_message"
      end

      def always_return(_data)
        raise "always_return is not implemented for out_message"
      end

      def error_with(_data)
        raise "error_with is not implemented for out_message"
      end

      def matches(message)
        if @invocation[:options] && message != @invocation[:options]
          return false
        end

        true
      end

      def call(_event)
        @calls += 1
      end

      def parameters
        @invocation[:options]
      end

      # Public methods

      def with_params(params)
        @invocation[:options] = params
        self
      end
    end
  end
end

Version data entries

83 entries across 83 versions & 1 rubygems

Version Path
bolt-3.12.0 lib/bolt_spec/plans/publish_stub.rb
bolt-3.11.0 lib/bolt_spec/plans/publish_stub.rb
bolt-3.10.0 lib/bolt_spec/plans/publish_stub.rb
bolt-3.9.2 lib/bolt_spec/plans/publish_stub.rb
bolt-3.9.1 lib/bolt_spec/plans/publish_stub.rb
bolt-3.9.0 lib/bolt_spec/plans/publish_stub.rb
bolt-3.8.1 lib/bolt_spec/plans/publish_stub.rb
bolt-3.8.0 lib/bolt_spec/plans/publish_stub.rb
bolt-3.7.1 lib/bolt_spec/plans/publish_stub.rb
bolt-3.7.0 lib/bolt_spec/plans/publish_stub.rb
bolt-3.6.1 lib/bolt_spec/plans/publish_stub.rb
bolt-3.6.0 lib/bolt_spec/plans/publish_stub.rb
bolt-3.5.0 lib/bolt_spec/plans/publish_stub.rb
bolt-3.4.0 lib/bolt_spec/plans/publish_stub.rb
bolt-3.3.0 lib/bolt_spec/plans/publish_stub.rb
bolt-3.1.0 lib/bolt_spec/plans/publish_stub.rb
bolt-3.0.1 lib/bolt_spec/plans/publish_stub.rb
bolt-3.0.0 lib/bolt_spec/plans/publish_stub.rb
bolt-2.44.0 lib/bolt_spec/plans/publish_stub.rb
bolt-2.42.0 lib/bolt_spec/plans/publish_stub.rb