Skip to content

Commit

Permalink
Create test for agent_helper in gem files
Browse files Browse the repository at this point in the history
Co-authored-by: AJ Esler <aj@esler.co.nz>
  • Loading branch information
kaylareopelle and ajesler committed Jul 11, 2023
1 parent 98d02ca commit 4049ec6
Showing 1 changed file with 20 additions and 0 deletions.
20 changes: 20 additions & 0 deletions test/new_relic/gemspec_files_test.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# This file is distributed under New Relic's license terms.
# See https://github.com/newrelic/newrelic-ruby-agent/blob/main/LICENSE for complete details.
# frozen_string_literal: true

require 'minitest/autorun'

class GemspecFilesTest < Minitest::Test
def test_the_test_agent_helper_is_shipped_in_the_gem_files
skip if defined?(Rails::VERSION)

agent_helper_file = 'test/agent_helper.rb'

gem_spec_file_path = File.expand_path('../../../newrelic_rpm.gemspec', __FILE__)

gem_spec = Gem::Specification.load(gem_spec_file_path)

assert_equal('newrelic_rpm', gem_spec.name)
assert_includes(gem_spec.files, agent_helper_file)
end
end

0 comments on commit 4049ec6

Please sign in to comment.