Sha256: 4c603a941c37be8c3c5f572e11cee5fbdaffe7c1e28c2479f786e986b64b5d01

Contents?: true

Size: 706 Bytes

Versions: 21

Compression:

Stored size: 706 Bytes

Contents

require 'test_helper'

class ActionViewIntegration < IntegrationTest
  def test_logs_render_template
    instrument "render_template"

    assert_gauge_logged "render_template.action_view"
  end

  def test_logs_render_partial
    instrument "render_partial"

    assert_gauge_logged "render_partial.action_view"
  end

  def test_skips_internal_partial_events
    instrument "!render_partial"

    refute_gauge_logged "!render_partial.action_view"
  end

  def test_skips_internal_template_events
    instrument "!render_template"

    refute_gauge_logged "!render_template.action_view"
  end

  private
  def instrument(event)
    ActiveSupport::Notifications.instrument "#{event}.action_view"
  end
end

Version data entries

21 entries across 21 versions & 1 rubygems

Version Path
harness-0.9.1 test/integration/integrations/action_view_test.rb
harness-0.9.0 test/integration/integrations/action_view_test.rb
harness-0.8.1 test/integration/integrations/action_view_test.rb
harness-0.8.0 test/integration/integrations/action_view_test.rb
harness-0.7.0 test/integration/integrations/action_view_test.rb
harness-0.6.0 test/integration/integrations/action_view_test.rb
harness-0.5.0 test/integration/integrations/action_view_test.rb
harness-0.4.0 test/integration/integrations/action_view_test.rb
harness-0.3.0 test/integration/integrations/action_view_test.rb
harness-0.2.16 test/integration/integrations/action_view_test.rb
harness-0.2.15 test/integration/integrations/action_view_test.rb
harness-0.2.14 test/integration/integrations/action_view_test.rb
harness-0.2.13 test/integration/integrations/action_view_test.rb
harness-0.2.12 test/integration/integrations/action_view_test.rb
harness-0.2.11 test/integration/integrations/action_view_test.rb
harness-0.2.10 test/integration/integrations/action_view_test.rb
harness-0.2.9 test/integration/integrations/action_view_test.rb
harness-0.2.8 test/integration/integrations/action_view_test.rb
harness-0.2.7 test/integration/integrations/action_view_test.rb
harness-0.2.6 test/integration/integrations/action_view_test.rb