Skip to content

Commit f84c61f

Browse files
committed
Minor Semaphore spec cleanups
* Use describe '#initialize' instead of context '#initialize' * Add parenthesis to avoid ruby warning
1 parent c1ab8ca commit f84c61f

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

spec/concurrent/atomic/semaphore_spec.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
shared_examples :semaphore do
22
let(:semaphore) { described_class.new(3) }
33

4-
context '#initialize' do
4+
describe '#initialize' do
55
it 'raises an exception if the initial count is not an integer' do
66
expect {
77
described_class.new('foo')
@@ -102,7 +102,7 @@
102102

103103
it 'reduces permits below zero' do
104104
semaphore.reduce_permits 1003
105-
expect(semaphore.available_permits).to eq -1000
105+
expect(semaphore.available_permits).to eq(-1000)
106106
end
107107

108108
it 'reduces permits' do

0 commit comments

Comments
 (0)