Sha256: f8f209c014f3d1c56c877eb93b9069fe2d9cb4fee9866c328fddf31468682c04

Contents?: true

Size: 245 Bytes

Versions: 8

Compression:

Stored size: 245 Bytes

Contents

RSpec.describe Yaks::FP::Callable do
  it 'should delegate to_proc to method(:call)' do
    obj = Class.new do
      include Yaks::FP::Callable

      def call(x) ; x * x ; end
    end.new

    expect([1,2,3].map(&obj)).to eql [1,4,9]
  end
end

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
yaks-0.9.0 spec/unit/yaks/fp/callable_spec.rb
yaks-0.8.3 spec/unit/yaks/fp/callable_spec.rb
yaks-0.8.2 spec/unit/yaks/fp/callable_spec.rb
yaks-0.8.1 spec/unit/yaks/fp/callable_spec.rb
yaks-0.8.0 spec/unit/yaks/fp/callable_spec.rb
yaks-0.8.0.beta2 spec/unit/yaks/fp/callable_spec.rb
yaks-0.8.0.beta1 spec/unit/yaks/fp/callable_spec.rb
yaks-0.8.0.alpha spec/unit/yaks/fp/callable_spec.rb