File tree Expand file tree Collapse file tree 1 file changed +5
-4
lines changed Expand file tree Collapse file tree 1 file changed +5
-4
lines changed Original file line number Diff line number Diff line change @@ -11,17 +11,18 @@ module Concurrent
11
11
end
12
12
13
13
it 'returns the global io executor when :executor is :io' do
14
- expect ( Concurrent ) . to receive ( :global_io_executor ) . and_return ( :io_executor )
15
- Executor . executor_from_options ( executor : :io )
14
+ executor = Executor . executor_from_options ( executor : :io )
15
+ expect ( executor ) . to eq Concurrent . global_io_executor
16
16
end
17
17
18
18
it 'returns the global fast executor when :executor is :fast' do
19
- expect ( Concurrent ) . to receive ( :global_fast_executor ) . and_return ( :fast_executor )
20
- Executor . executor_from_options ( executor : :fast )
19
+ executor = Executor . executor_from_options ( executor : :fast )
20
+ expect ( executor ) . to eq Concurrent . global_fast_executor
21
21
end
22
22
23
23
it 'returns an immediate executor when :executor is :immediate' do
24
24
executor = Executor . executor_from_options ( executor : :immediate )
25
+ expect ( executor ) . to be_a Concurrent ::ImmediateExecutor
25
26
end
26
27
27
28
it 'raises an exception when :executor is an unrecognized symbol' do
You can’t perform that action at this time.
0 commit comments