Replace couchbase counters with drb version

This commit is contained in:
2014-08-05 17:49:16 +02:00
parent c0c25673bf
commit 99a9536c68
20 changed files with 400 additions and 282 deletions
+12 -12
View File
@@ -16,18 +16,18 @@ describe Supplier do
supplier2.orders_placed_count.should == 3
end
it 'cleans counter values if orders are no longer available' do
old_connection = Qwaiter::Counter.connection
# this spec should run on the couchbase database
Qwaiter::Counter.connection = $cb
supplier = create :supplier
Qwaiter::Counter.set "supplier_counter:#{supplier.id}:orders_placed", 9
supplier.orders_placed_count.should == 9
Supplier.reset_counters!
sleep 1
supplier.orders_placed_count.should == 0
Qwaiter::Counter.connection = old_connection
end
# it 'cleans counter values if orders are no longer available', broken: defined?($cb) do
# old_connection = Qwaiter::Counter.connection
# # this spec should run on the couchbase database
# Qwaiter::Counter.connection = $cb
# supplier = create :supplier
# Qwaiter::Counter.set "supplier_counter:#{supplier.id}:orders_placed", 9
# supplier.orders_placed_count.should == 9
# Supplier.reset_counters!
# sleep 1
# supplier.orders_placed_count.should == 0
# Qwaiter::Counter.connection = old_connection
# end
end
describe '#reset_counters!' do