Sha256: a6827d9f6442283087ba2428412dd4f6576a719b454e89fd85fb67cdba527221
Contents?: true
Size: 831 Bytes
Versions: 9
Compression:
Stored size: 831 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 File.expand_path(File.join(File.dirname(__FILE__),'..','..','test_helper')) require 'new_relic/rack/agent_hooks' class AgentHooksTest < Test::Unit::TestCase def setup @app = stub_everything @hooks = NewRelic::Rack::AgentHooks.new(@app) @env = {:env => "env"} NewRelic::Agent.instance.events.stubs(:notify) end def test_before_call NewRelic::Agent.instance.events.expects(:notify).with(:before_call, @env) @hooks.call(@env) end def test_after_call result = stub @app.stubs(:call).returns(result) NewRelic::Agent.instance.events.expects(:notify).with(:after_call, @env, result) @hooks.call(@env) end end
Version data entries
9 entries across 9 versions & 1 rubygems