Skip to content

Commit b36de96

Browse files
committed
Fixed buggy test.
1 parent 4ffdb7e commit b36de96

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

spec/concurrent/executor/executor_options_spec.rb

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,17 +11,18 @@ module Concurrent
1111
end
1212

1313
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
1616
end
1717

1818
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
2121
end
2222

2323
it 'returns an immediate executor when :executor is :immediate' do
2424
executor = Executor.executor_from_options(executor: :immediate)
25+
expect(executor).to be_a Concurrent::ImmediateExecutor
2526
end
2627

2728
it 'raises an exception when :executor is an unrecognized symbol' do

0 commit comments

Comments
 (0)