Skip to content

Commit

Permalink
Fixed buggy test.
Browse files Browse the repository at this point in the history
  • Loading branch information
jdantonio committed Aug 19, 2015
1 parent 4ffdb7e commit b36de96
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions spec/concurrent/executor/executor_options_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -11,17 +11,18 @@ module Concurrent
end

it 'returns the global io executor when :executor is :io' do
expect(Concurrent).to receive(:global_io_executor).and_return(:io_executor)
Executor.executor_from_options(executor: :io)
executor = Executor.executor_from_options(executor: :io)
expect(executor).to eq Concurrent.global_io_executor
end

it 'returns the global fast executor when :executor is :fast' do
expect(Concurrent).to receive(:global_fast_executor).and_return(:fast_executor)
Executor.executor_from_options(executor: :fast)
executor = Executor.executor_from_options(executor: :fast)
expect(executor).to eq Concurrent.global_fast_executor
end

it 'returns an immediate executor when :executor is :immediate' do
executor = Executor.executor_from_options(executor: :immediate)
expect(executor).to be_a Concurrent::ImmediateExecutor
end

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

0 comments on commit b36de96

Please sign in to comment.