stability improvement

This commit is contained in:
2014-07-28 17:33:40 +02:00
parent 48e1850200
commit 7443d3b08b
12 changed files with 67 additions and 14 deletions
+30
View File
@@ -0,0 +1,30 @@
require 'spec_helper'
describe Qwaiter::Counter do
describe 'couchbase connection' do
before do
@original_connection = Qwaiter::Counter.connection
Qwaiter::Counter.connection = $cb
end
after do
Qwaiter::Counter.connection = @original_connection
end
describe '.incr' do
it 'sets nonexistent keys to 1' do
expect( subject.incr 'nonexistent1' ).to eq 1
expect( subject.get 'nonexistent1' ).to eq 1
end
end
end
describe 'test connection' do
describe '.incr' do
it 'sets nonexistent keys to 1' do
expect( subject.incr 'nonexistent1' ).to eq 1
expect( subject.get 'nonexistent1' ).to eq 1
end
end
end
end