spec/unit/yaks/fp/callable_spec.rb in yaks-0.9.0 vs spec/unit/yaks/fp/callable_spec.rb in yaks-0.10.0

- old
+ new

@@ -1,11 +1,13 @@ -RSpec.describe Yaks::FP::Callable do +RSpec.describe Yaks::FP::Callable, "#to_proc" do it 'should delegate to_proc to method(:call)' do obj = Class.new do include Yaks::FP::Callable - def call(x) ; x * x ; end + def call(x) + x * x + end end.new - expect([1,2,3].map(&obj)).to eql [1,4,9] + expect([1, 2, 3].map(&obj)).to eql [1, 4, 9] end end