Skip to content

Commit

Permalink
Merge pull request #2793 from newrelic/framework-detection-tests
Browse files Browse the repository at this point in the history
Add tests to verify framework detection
  • Loading branch information
kaylareopelle authored Aug 5, 2024
2 parents 0df30bc + 5c53afb commit 587fcbb
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 0 deletions.
4 changes: 4 additions & 0 deletions test/multiverse/suites/grape/grape_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,10 @@ def app
Rack::Builder.app { run(GrapeTestApi.new) }
end

def test_framework_assignment
assert_equal(:grape, NewRelic::Agent.config[:framework])
end

def test_nonexistent_route
get('/not_grape_ape')

Expand Down
4 changes: 4 additions & 0 deletions test/multiverse/suites/padrino/padrino_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,10 @@ def teardown
mocha_teardown
end

def test_framework_assignment
assert_equal(:padrino, NewRelic::Agent.config[:framework])
end

def test_tracing_is_involved
klass = ENV['MULTIVERSE_INSTRUMENTATION_METHOD'] == 'chain' ? ::PadrinoTestApp : ::Padrino::Application
klass.any_instance.expects(:invoke_route_with_tracing)
Expand Down
4 changes: 4 additions & 0 deletions test/multiverse/suites/roda/roda_instrumentation_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,10 @@ def app
RodaTestApp
end

def test_framework_assignment
assert_equal(:roda, NewRelic::Agent.config[:framework])
end

def test_http_verb_request_no_request_method
fake_request = Struct.new('FakeRequest', :path).new
name = NewRelic::Agent::Instrumentation::Roda::TransactionNamer.transaction_name(fake_request)
Expand Down

0 comments on commit 587fcbb

Please sign in to comment.