Skip to content

Commit

Permalink
Replace access token when recording VCR cassettes. Part of #13.
Browse files Browse the repository at this point in the history
  • Loading branch information
dblock committed Dec 4, 2018
1 parent 0b2e199 commit 357cda6
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
2 changes: 1 addition & 1 deletion spec/support/shared/api_client.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,5 @@
before do
Strava::Api::Config.reset
end
let(:client) { Strava::Api::Client.new(access_token: 'access-token') }
let(:client) { Strava::Api::Client.new(access_token: ENV['STRAVA_ACCESS_TOKEN'] || 'access-token') }
end
1 change: 1 addition & 0 deletions spec/support/vcr.rb
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
config.default_cassette_options = { record: :new_episodes }
config.configure_rspec_metadata!
config.before_record do |i|
i.request.headers['Authorization'] = ['Bearer access-token'] if ENV.key?('STRAVA_ACCESS_TOKEN')
i.response.body.force_encoding('UTF-8')
end
end

0 comments on commit 357cda6

Please sign in to comment.