Sha256: a96c1fe8d0dae41a99fab966a800b25061fffa169a2470bc89bea091d63a6c40

Contents?: true

Size: 1005 Bytes

Versions: 37

Compression:

Stored size: 1005 Bytes

Contents

# encoding: utf-8
# This file is distributed under New Relic's license terms.
# See https://github.com/newrelic/rpm/blob/master/LICENSE for complete details.

require './app'

if defined?(ActionController::Live)

class UndeadController < ApplicationController
  RESPONSE_BODY = "<html><head></head><body>Brains!</body></html>"

  def brains
    render :inline => RESPONSE_BODY
  end
end

class LiveController < UndeadController
  include ActionController::Live
end

class ActionControllerLiveRumTest < RailsMultiverseTest
  include MultiverseHelpers

  JS_LOADER = "JS LOADER IN DA HOUSE"

  setup_and_teardown_agent(:js_agent_loader => JS_LOADER, :beacon => "beacon", :browser_key => "key")

  def test_rum_instrumentation_when_not_streaming
    get '/undead/brains'
    assert_includes(response.body, JS_LOADER)
  end

  def test_excludes_rum_instrumentation_when_streaming_with_action_controller_live
    get '/live/brains'
    assert_equal(LiveController::RESPONSE_BODY, response.body)
  end
end

end

Version data entries

37 entries across 37 versions & 2 rubygems

Version Path
newrelic_rpm-4.1.0.333 test/multiverse/suites/rails/action_controller_live_rum_test.rb
newrelic_rpm-4.0.0.332 test/multiverse/suites/rails/action_controller_live_rum_test.rb
newrelic_rpm-3.18.1.330 test/multiverse/suites/rails/action_controller_live_rum_test.rb
newrelic_rpm-3.18.0.329 test/multiverse/suites/rails/action_controller_live_rum_test.rb
newrelic_rpm-3.17.2.327 test/multiverse/suites/rails/action_controller_live_rum_test.rb
newrelic_rpm-3.17.1.326 test/multiverse/suites/rails/action_controller_live_rum_test.rb
newrelic_rpm-3.17.0.325 test/multiverse/suites/rails/action_controller_live_rum_test.rb
newrelic_rpm-3.16.3.323 test/multiverse/suites/rails/action_controller_live_rum_test.rb
newrelic_rpm-3.16.2.321 test/multiverse/suites/rails/action_controller_live_rum_test.rb
newrelic_rpm-3.16.1.320 test/multiverse/suites/rails/action_controller_live_rum_test.rb
newrelic_rpm-3.16.0.318 test/multiverse/suites/rails/action_controller_live_rum_test.rb
ish_lib_manager-0.0.1 test/dummy/vendor/bundle/ruby/2.3.0/gems/newrelic_rpm-3.15.2.317/test/multiverse/suites/rails/action_controller_live_rum_test.rb
newrelic_rpm-3.15.2.317 test/multiverse/suites/rails/action_controller_live_rum_test.rb
newrelic_rpm-3.15.1.316 test/multiverse/suites/rails/action_controller_live_rum_test.rb
newrelic_rpm-3.15.0.314 test/multiverse/suites/rails/action_controller_live_rum_test.rb
newrelic_rpm-3.14.3.313 test/multiverse/suites/rails/action_controller_live_rum_test.rb
newrelic_rpm-3.14.2.312 test/multiverse/suites/rails/action_controller_live_rum_test.rb
newrelic_rpm-3.14.1.311 test/multiverse/suites/rails/action_controller_live_rum_test.rb
newrelic_rpm-3.14.0.305 test/multiverse/suites/rails/action_controller_live_rum_test.rb
newrelic_rpm-3.13.2.302 test/multiverse/suites/rails/action_controller_live_rum_test.rb