Permalink
Browse files

mongrel rpm update, fixing test

  • Loading branch information...
1 parent 5d61b8f commit 0c53352f5b9cfd88a4cc0d8ac99aa369ea389347 @bkayser bkayser committed Jun 8, 2010
Showing with 7 additions and 3 deletions.
  1. +1 −2 lib/new_relic/rack/metric_app.rb
  2. +6 −1 test/new_relic/agent/rpm_agent_test.rb
@@ -20,8 +20,7 @@ def initialize(options)
options[:disable_samplers] = true
NewRelic::Agent.manual_start options
unless NewRelic::Control.instance.license_key
- NewRelic::Agent.logger.error "Please add a valid license key to newrelic.yml."
- exit 1
+ raise "Please add a valid license key to newrelic.yml."
end
end
def call(env)
@@ -128,8 +128,13 @@ class RpmAgentTest < Test::Unit::TestCase # ActiveSupport::TestCase
end
context "with transaction api" do
+ should "reject empty arguments" do
+ assert_raises RuntimeError do
+ NewRelic::Agent.record_transaction 0.5
+ end
+ end
should "record a transaction" do
- NewRelic::Agent.record_transaction 0.5, :uri => "/users/create?foo=bar"
+ NewRelic::Agent.record_transaction 0.5, 'uri' => "/users/create?foo=bar"
end
end

0 comments on commit 0c53352

Please sign in to comment.