Use the old hash syntax

This commit is contained in:
Yuki Nishijima 2014-03-08 22:46:25 -08:00
parent 2769f32ec1
commit 62d04f2bb1
1 changed files with 4 additions and 4 deletions

View File

@ -123,17 +123,17 @@ if defined? Mongoid
context "with database:", :if => Mongoid::VERSION >= '3' do
before :all do
15.times { User.with(database: "default_db").create!(:salary => 1) }
10.times { User.with(database: "other_db").create!(:salary => 1) }
15.times { User.with(:database => "default_db").create!(:salary => 1) }
10.times { User.with(:database => "other_db").create!(:salary => 1) }
end
context "default_db" do
subject { User.with(database: "default_db").order_by(:artist.asc).page(1) }
subject { User.with(:database => "default_db").order_by(:artist.asc).page(1) }
its(:total_count) { should == 15 }
end
context "other_db" do
subject { User.with(database: "other_db").order_by(:artist.asc).page(1) }
subject { User.with(:database => "other_db").order_by(:artist.asc).page(1) }
its(:total_count) { should == 10 }
end
end