Sha256: a49ed40152e952d155803822f782b1e1aad12bd4e378fe74319a30c214c4e621
Contents?: true
Size: 516 Bytes
Versions: 5
Compression:
Stored size: 516 Bytes
Contents
RSpec.describe Dry::Transaction::StepAdapters::Map 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 result of the operation 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