diff --git a/.travis.yml b/.travis.yml index 332fa64ac..afeefccd9 100644 --- a/.travis.yml +++ b/.travis.yml @@ -20,7 +20,6 @@ env: - OCTOKIT_TEST_GITHUB_TOKEN="6a21f190e3422bf89afa8b360d923b0c30e8fbfa" - OCTOKIT_TEST_GITHUB_CLIENT_ID='abcdefabcdefabcdefab' - OCTOKIT_TEST_GITHUB_CLIENT_SECRET='abcdefabcdefabcdefababcdefabcdefabcdefab' - - OCTOKIT_TEST_INTEGRATION_PEM_KEY='./spec/fixtures/fake_integration.private-key.pem' - OCTOKIT_SILENT=true before_script: diff --git a/spec/helper.rb b/spec/helper.rb index e6220185c..6de25e716 100644 --- a/spec/helper.rb +++ b/spec/helper.rb @@ -181,6 +181,10 @@ def test_github_integration_installation ENV.fetch 'OCTOKIT_TEST_GITHUB_INTEGRATION_INSTALLATION', 37 end +def test_github_integration_pem_key + ENV.fetch 'OCTOKIT_TEST_INTEGRATION_PEM_KEY', "#{fixture_path}/fake_integration.private-key.pem" +end + def stub_delete(url) stub_request(:delete, github_url(url)) end diff --git a/spec/octokit/client/integrations_spec.rb b/spec/octokit/client/integrations_spec.rb index 06e9f82cc..bca205013 100644 --- a/spec/octokit/client/integrations_spec.rb +++ b/spec/octokit/client/integrations_spec.rb @@ -90,7 +90,7 @@ private def new_jwt_token - private_pem = File.read(ENV['OCTOKIT_TEST_INTEGRATION_PEM_KEY']) + private_pem = File.read(test_github_integration_pem_key) private_key = OpenSSL::PKey::RSA.new(private_pem) payload = {}.tap do |opts|