Sha256: 39da09387729536e763522cd24664b678b1409c2d56d767978bef3143da4d200

Contents?: true

Size: 507 Bytes

Versions: 5

Compression:

Stored size: 507 Bytes

Contents

RSpec.describe Dry::Transaction::StepAdapters::Tee do

  subject { described_class.new }

  let(:operation) {
    -> (input) { input.upcase }
  }

  let(:step) {
    Dry::Transaction::Step.new(subject, :step, :step, operation, {})
  }

  describe "#call" do

    it "return a Right Monad" do
      expect(subject.call(step, 'input')).to be_a Dry::Monads::Either::Right
    end

    it "return the original input as output" do
      expect(subject.call(step, 'input').value).to eql 'input'
    end
  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
dry-transaction-0.10.2 spec/unit/step_adapters/tee_spec.rb
dry-transaction-0.10.1 spec/unit/step_adapters/tee_spec.rb
dry-transaction-0.10.0 spec/unit/step_adapters/tee_spec.rb
dry-transaction-0.9.0 spec/unit/step_adapters/tee_spec.rb
dry-transaction-0.8.0 spec/unit/step_adapters/tee_spec.rb