Sha256: 07e943b0f0814667bb756a29993528aace93ff22385205092e486714776fce23

Contents?: true

Size: 829 Bytes

Versions: 21

Compression:

Stored size: 829 Bytes

Contents

require 'test_helper'

class ActiveSupportIntegration < IntegrationTest
  def test_logs_cache_read
    instrument "cache_read"

    assert_gauge_logged "cache_read.active_support"
  end

  def test_logs_cache_generate
    instrument "cache_generate"

    assert_gauge_logged "cache_generate.active_support"
  end

  def test_logs_cache_fetch_hit
    instrument "cache_fetch_hit"

    assert_gauge_logged "cache_fetch_hit.active_support"
  end

  def test_logs_cache_write
    instrument "cache_write"

    assert_gauge_logged "cache_write.active_support"
  end

  def test_logs_cache_delete
    instrument "cache_delete"

    assert_gauge_logged "cache_delete.active_support"
  end

  private
  def instrument(event)
    ActiveSupport::Notifications.instrument "#{event}.active_support" do |*args|
      # nada
    end
  end
end

Version data entries

21 entries across 21 versions & 1 rubygems

Version Path
harness-0.3.0 test/integration/integrations/active_support_test.rb
harness-0.2.16 test/integration/integrations/active_support_test.rb
harness-0.2.15 test/integration/integrations/active_support_test.rb
harness-0.2.14 test/integration/integrations/active_support_test.rb
harness-0.2.13 test/integration/integrations/active_support_test.rb
harness-0.2.12 test/integration/integrations/active_support_test.rb
harness-0.2.11 test/integration/integrations/active_support_test.rb
harness-0.2.10 test/integration/integrations/active_support_test.rb
harness-0.2.9 test/integration/integrations/active_support_test.rb
harness-0.2.8 test/integration/integrations/active_support_test.rb
harness-0.2.7 test/integration/integrations/active_support_test.rb
harness-0.2.6 test/integration/integrations/active_support_test.rb
harness-0.2.5 test/integration/integrations/active_support_test.rb
harness-0.2.4 test/integration/integrations/active_support_test.rb
harness-0.2.3 test/integration/integrations/active_support_test.rb
harness-0.2.2 test/integration/integrations/active_support_test.rb
harness-0.2.1 test/integration/integrations/active_support_test.rb
harness-0.2.0 test/integration/integrations/active_support_test.rb
harness-0.1.2 test/integration/integrations/active_support_test.rb
harness-0.1.1 test/integration/integrations/active_support_test.rb