Skip to content

Commit

Permalink
Use VCR ENV helper instead of reading from ENV directly
Browse files Browse the repository at this point in the history
  • Loading branch information
tarebyte committed Mar 15, 2017
1 parent e0d5884 commit 7a5940c
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 2 deletions.
1 change: 0 additions & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
4 changes: 4 additions & 0 deletions spec/helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion spec/octokit/client/integrations_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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|
Expand Down

0 comments on commit 7a5940c

Please sign in to comment.