Sha256: 685ad68756e1f7e72b333dd6fdfb4d71aa76adcbcb88e7c60eced407ebfe391a
Contents?: true
Size: 795 Bytes
Versions: 24
Compression:
Stored size: 795 Bytes
Contents
require File.expand_path(File.join(File.dirname(__FILE__), '..', '..', '..', 'test_helper')) require 'new_relic/agent/instrumentation/sinatra' class NewRelic::Agent::Instrumentation::SinatraTest < Test::Unit::TestCase class SinatraTestApp def initialize(response) @response = response end def dispatch! @response = response end include NewRelic::Agent::Instrumentation::Sinatra alias dispatch_without_newrelic dispatch! alias dispatch! dispatch_with_newrelic end def test_newrelic_request_headers app = SinatraTestApp.new([200, {}, ["OK"]]) expected_headers = {:fake => :header} app.expects(:request).returns(mock('request', :env => expected_headers)) assert_equal app.send(:newrelic_request_headers), expected_headers end end
Version data entries
24 entries across 24 versions & 3 rubygems