Skip to content

Commit

Permalink
mongrel rpm update, fixing test
Browse files Browse the repository at this point in the history
  • Loading branch information
Bill Kayser committed Jun 8, 2010
1 parent 5d61b8f commit 0c53352
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
3 changes: 1 addition & 2 deletions lib/new_relic/rack/metric_app.rb
Expand Up @@ -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)
Expand Down
7 changes: 6 additions & 1 deletion test/new_relic/agent/rpm_agent_test.rb
Expand Up @@ -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
Expand Down

0 comments on commit 0c53352

Please sign in to comment.