Sha256: 0b22d63c26a880265e3205c2b23fdb7b4c7ba713a865eb7bad758f514f37b6cb
Contents?: true
Size: 509 Bytes
Versions: 1
Compression:
Stored size: 509 Bytes
Contents
# frozen_string_literal: true require 'ostruct' RSpec.describe Dry::Transformer::ProcTransformations do describe '.bind' do let(:fn) { described_class.t(:bind, binding, proc) } let(:binding) { OpenStruct.new(prefix: prefix) } let(:proc) { -> v { [prefix, v].join('_') } } let(:prefix) { 'foo' } let(:input) { 'bar' } let(:output) { 'foo_bar' } subject { fn[input] } it 'binds the given proc to the specified binding' do is_expected.to eq(output) end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
dry-transformer-0.1.0 | spec/unit/proc_transformations_spec.rb |