File tree Expand file tree Collapse file tree 1 file changed +11
-9
lines changed Expand file tree Collapse file tree 1 file changed +11
-9
lines changed Original file line number Diff line number Diff line change @@ -521,7 +521,7 @@ def behaves_as_delay(delay, value)
521
521
v += 1
522
522
v < 5 ? [ future ( v , &body ) ] : v
523
523
end
524
- expect ( future ( 0 , &body ) . run ( -> v { v . first if v . is_a? Array } ) . value! ) . to eq 5
524
+ expect ( future ( 0 , &body ) . run ( -> v { v . first if v . is_a? Array } ) . value! ) . to eq 5
525
525
end
526
526
527
527
it 'can be risen when rejected' do
@@ -692,15 +692,17 @@ def behaves_as_delay(delay, value)
692
692
value! ) . to eq 6
693
693
end
694
694
695
- it 'with erlang actor' do
696
- actor = Concurrent ::ErlangActor . spawn :on_thread do
697
- reply receive * 2
698
- end
695
+ if Concurrent . const_defined? :ErlangActor
696
+ it 'with erlang actor' do
697
+ actor = Concurrent ::ErlangActor . spawn :on_thread do
698
+ reply receive * 2
699
+ end
699
700
700
- expect ( future { 2 } .
701
- then_ask ( actor ) .
702
- then { |v | v + 2 } .
703
- value! ) . to eq 6
701
+ expect ( future { 2 } .
702
+ then_ask ( actor ) .
703
+ then { |v | v + 2 } .
704
+ value! ) . to eq 6
705
+ end
704
706
end
705
707
706
708
it 'with channel' do
You can’t perform that action at this time.
0 commit comments