Browse files

Use DB 15 in test

  • Loading branch information...
1 parent 2c0700b commit 4f9c68e557afbc9a20e11d68cbd6378a55e54e0c @czarneckid czarneckid committed Apr 26, 2012
Showing with 10 additions and 10 deletions.
  1. +5 −5 spec/leaderboard_spec.rb
  2. +5 −5 spec/reverse_leaderboard_spec.rb
View
10 spec/leaderboard_spec.rb
@@ -2,8 +2,8 @@
describe 'Leaderboard' do
before(:each) do
- @redis_connection = Redis.new(:host => "127.0.0.1")
- @leaderboard = Leaderboard.new('name', Leaderboard::DEFAULT_LEADERBOARD_REQUEST_OPTIONS, :host => "127.0.0.1")
+ @redis_connection = Redis.new(:host => "127.0.0.1", :db => 15)
+ @leaderboard = Leaderboard.new('name', Leaderboard::DEFAULT_LEADERBOARD_REQUEST_OPTIONS, :host => "127.0.0.1", :db => 15)
end
after(:each) do
@@ -300,8 +300,8 @@
end
it 'should allow you to merge leaderboards' do
- foo = Leaderboard.new('foo')
- bar = Leaderboard.new('bar')
+ foo = Leaderboard.new('foo', Leaderboard::DEFAULT_LEADERBOARD_REQUEST_OPTIONS, :host => "127.0.0.1", :db => 15)
+ bar = Leaderboard.new('bar', Leaderboard::DEFAULT_LEADERBOARD_REQUEST_OPTIONS, :host => "127.0.0.1", :db => 15)
foo.rank_member('foo_1', 1)
foo.rank_member('foo_2', 2)
@@ -312,7 +312,7 @@
foobar_keys = foo.merge_leaderboards('foobar', ['bar'])
foobar_keys.should be(5)
- foobar = Leaderboard.new('foobar')
+ foobar = Leaderboard.new('foobar', Leaderboard::DEFAULT_LEADERBOARD_REQUEST_OPTIONS, :host => "127.0.0.1", :db => 15)
foobar.total_members.should be(5)
first_leader_in_foobar = foobar.leaders(1).first
View
10 spec/reverse_leaderboard_spec.rb
@@ -2,8 +2,8 @@
describe 'Leaderboard (reverse option)' do
before(:each) do
- @redis_connection = Redis.new(:host => "127.0.0.1")
- @leaderboard = Leaderboard.new('name', Leaderboard::DEFAULT_LEADERBOARD_REQUEST_OPTIONS.merge({:reverse => true}), :host => "127.0.0.1")
+ @redis_connection = Redis.new(:host => "127.0.0.1", :db => 15)
+ @leaderboard = Leaderboard.new('name', Leaderboard::DEFAULT_LEADERBOARD_REQUEST_OPTIONS.merge({:reverse => true}), :host => "127.0.0.1", :db => 15)
end
after(:each) do
@@ -164,8 +164,8 @@
end
it 'should allow you to merge leaderboards' do
- foo = Leaderboard.new('foo')
- bar = Leaderboard.new('bar')
+ foo = Leaderboard.new('foo', Leaderboard::DEFAULT_LEADERBOARD_REQUEST_OPTIONS, :host => "127.0.0.1", :db => 15)
+ bar = Leaderboard.new('bar', Leaderboard::DEFAULT_LEADERBOARD_REQUEST_OPTIONS, :host => "127.0.0.1", :db => 15)
foo.rank_member('foo_1', 1)
foo.rank_member('foo_2', 2)
@@ -176,7 +176,7 @@
foobar_keys = foo.merge_leaderboards('foobar', ['bar'])
foobar_keys.should be(5)
- foobar = Leaderboard.new('foobar')
+ foobar = Leaderboard.new('foobar', Leaderboard::DEFAULT_LEADERBOARD_REQUEST_OPTIONS, :host => "127.0.0.1", :db => 15)
foobar.total_members.should be(5)
first_leader_in_foobar = foobar.leaders(1).first

0 comments on commit 4f9c68e

Please sign in to comment.