Sha256: 4553a9cacd6ddb457c3f40303a0db71e3ff11985f3aa5546d948db5b34a07da3
Contents?: true
Size: 842 Bytes
Versions: 9
Compression:
Stored size: 842 Bytes
Contents
require File.expand_path(File.dirname(__FILE__) + '/../spec_helper') describe "when the database is not entire sharded" do before(:each) do Octopus.stub!(:env).and_return("not_entire_sharded") clean_connection_proxy() end it "should not send all queries to the specified slave" do pending() # User.create!(:name => "Thiago") # # using_enviroment :not_entire_sharded do # Octopus.using(:russia) do # User.create!(:name => "Thiago") # end # end # # User.count.should == 2 end it "should pick the shard based on current_shard when you have a sharded model" do Cat.create!(:name => "Thiago") using_enviroment :not_entire_sharded do Octopus.using(:russia) do Cat.create!(:name => "Thiago") end end Cat.count.should == 1 end end
Version data entries
9 entries across 9 versions & 1 rubygems