Sha256: d827411e22df045b3873b0440620b88228ceb5338e88c0266e3d47115b7bbd53

Contents?: true

Size: 878 Bytes

Versions: 8

Compression:

Stored size: 878 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)
    require 'harness/integration/active_support'
    ActiveSupport::Notifications.instrument "#{event}.active_support" do |*args|
      # nada
    end
  end
end

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
harness-0.9.1 test/integration/integrations/active_support_test.rb
harness-0.9.0 test/integration/integrations/active_support_test.rb
harness-0.8.1 test/integration/integrations/active_support_test.rb
harness-0.8.0 test/integration/integrations/active_support_test.rb
harness-0.7.0 test/integration/integrations/active_support_test.rb
harness-0.6.0 test/integration/integrations/active_support_test.rb
harness-0.5.0 test/integration/integrations/active_support_test.rb
harness-0.4.0 test/integration/integrations/active_support_test.rb