Inject a wrapped operation in dry-transaction?


#1

Hi,

I have a transaction with an operation that is wrapped.

class Import
  include Dry::Transaction(container: MyContainer)

  step :store_product, with: 'product.store_product'

  private

  def store_product(input)
    super(input) do |m|
      m.success { |out| Success([input, output]) }
      m.failure { |err| Failure(err) }
    end
  end
end

I want to test the method #store_product. So I want to inject the original operation by a mock operation.
Is it possible?