File tree Expand file tree Collapse file tree 1 file changed +11
-1
lines changed Expand file tree Collapse file tree 1 file changed +11
-1
lines changed Original file line number Diff line number Diff line change 29
29
30
30
future = fulfilled_future ( 1 ) . then { |v | v + 1 }
31
31
expect ( future . value! ) . to eq 2
32
+
33
+ future = future ( 1 , 2 , &-> v { v } )
34
+ expect { future . value! } . to raise_error ArgumentError , /wrong number of arguments/
35
+
36
+ future = fulfilled_future ( 1 ) . then ( 2 , &-> v { v } )
37
+ expect { future . value! } . to raise_error ArgumentError , /wrong number of arguments/
32
38
end
33
39
34
40
it 'executes with args' do
@@ -675,7 +681,7 @@ def behaves_as_delay(delay, value)
675
681
end
676
682
677
683
describe 'interoperability' do
678
- it 'with actor' , if : !defined? ( JRUBY_VERSION ) do
684
+ it 'with processing actor' , if : !defined? ( JRUBY_VERSION ) do
679
685
actor = Concurrent ::Actor ::Utils ::AdHoc . spawn :doubler do
680
686
-> v { v * 2 }
681
687
end
@@ -700,6 +706,10 @@ def behaves_as_delay(delay, value)
700
706
expect ( result . value! ) . to eq '02'
701
707
end
702
708
end
709
+
710
+ specify 'zip_futures_over' do
711
+ expect ( zip_futures_over ( [ 1 , 2 ] ) { |v | v . succ } . value! ) . to eq [ 2 , 3 ]
712
+ end
703
713
end
704
714
705
715
RSpec . describe 'Concurrent::ProcessingActor' do
You can’t perform that action at this time.
0 commit comments