Skip to content

Commit

Permalink
bbaja42-barisa/check-for-negative-concurrency-value s/concurrency/Con…
Browse files Browse the repository at this point in the history
…currency/
  • Loading branch information
Pablo Cantero committed Feb 14, 2016
1 parent b1b6f31 commit 072446b
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion lib/shoryuken/manager.rb
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ class Manager

def initialize(condvar)
@count = Shoryuken.options[:concurrency] || 25
raise(ArgumentError, "concurrency value #{@count} is invalid, it needs to be a positive number") unless @count > 0
raise(ArgumentError, "Concurrency value #{@count} is invalid, it needs to be a positive number") unless @count > 0
@queues = Shoryuken.queues.dup.uniq
@finished = condvar

Expand Down
4 changes: 2 additions & 2 deletions spec/shoryuken/manager_spec.rb
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
require 'spec_helper'
require 'shoryuken/manager'

describe Shoryuken::Manager do
RSpec.describe Shoryuken::Manager do
subject do
condvar = double(:condvar)
allow(condvar).to receive(:signal).and_return(nil)
Expand All @@ -12,7 +12,7 @@
it 'raises ArgumentError if concurrency is not positive number' do
Shoryuken.options[:concurrency] = -1
expect { Shoryuken::Manager.new(nil) }
.to raise_error(ArgumentError, 'concurrency value -1 is invalid, it needs to be a positive number')
.to raise_error(ArgumentError, 'Concurrency value -1 is invalid, it needs to be a positive number')
end

end
Expand Down

0 comments on commit 072446b

Please sign in to comment.