Sha256: cdea061e9b87df9d3bca50a86e5524cd9338e40911a1cf95f67d9b361f57bf84

Contents?: true

Size: 422 Bytes

Versions: 20

Compression:

Stored size: 422 Bytes

Contents

shared_context 'with query cache enabled' do
  let!(:counter) { ActiveRecord::QueryCounter.new }

  before(:each) do
    ActiveRecord::Base.connection.enable_query_cache!
    counter.query_count = 0
  end

  after(:each) do
    ActiveRecord::Base.connection.disable_query_cache!
  end

  around(:each) do |example|
    active_support_subscribed(counter.to_proc, 'sql.active_record') do
      example.run
    end
  end
end

Version data entries

20 entries across 20 versions & 5 rubygems

Version Path
ar-octopus-ruby-3-0.11.3 spec/support/shared_contexts.rb
ar-octopus-ruby-3-0.11.2 spec/support/shared_contexts.rb
octoball-0.1.4 spec/support/shared_contexts.rb
octoball-0.1.3 spec/support/shared_contexts.rb
octoball-0.1.2 spec/support/shared_contexts.rb
octoball-0.1.1 spec/support/shared_contexts.rb
octoball-0.1.0 spec/support/shared_contexts.rb
ar-octopus-0.10.2 spec/support/shared_contexts.rb
ar-octopus-0.10.1 spec/support/shared_contexts.rb
ar-octopus-0.10.0 spec/support/shared_contexts.rb
ar-octopus-master-0.9.2.1 spec/support/shared_contexts.rb
ar-octopus-0.9.2 spec/support/shared_contexts.rb
ar-octopus-0.9.1 spec/support/shared_contexts.rb
ar-octopus-0.9.0 spec/support/shared_contexts.rb
ar-octopus-0.8.6 spec/support/shared_contexts.rb
misha-ar-octopus-0.8.7 spec/support/shared_contexts.rb
misha-ar-octopus-0.8.5 spec/support/shared_contexts.rb
ar-octopus-0.8.5 spec/support/shared_contexts.rb
ar-octopus-0.8.4 spec/support/shared_contexts.rb
ar-octopus-0.8.3 spec/support/shared_contexts.rb