Sha256: 1fc5c1affe80ec913d181970f079936a50707c0250fd9732ef684577251e92a6
Contents?: true
Size: 534 Bytes
Versions: 8
Compression:
Stored size: 534 Bytes
Contents
require 'spec_helper' describe Octopus::LogSubscriber, :shards => [:canada] do before :each do @out = StringIO.new @log = Logger.new(@out) ActiveRecord::Base.logger = @log ActiveRecord::Base.logger.level = Logger::DEBUG end after :each do ActiveRecord::Base.logger = Logger.new(File.open('database.log', 'a')) end it 'should add to the default logger the shard name the query was sent to' do User.using(:canada).create!(:name => 'test') expect(@out.string).to match(/Shard: canada/) end end
Version data entries
8 entries across 8 versions & 3 rubygems