Skip to content
This repository has been archived by the owner on Nov 19, 2018. It is now read-only.

Commit

Permalink
Automatic clearing of API key cache after tests
Browse files Browse the repository at this point in the history
  • Loading branch information
KrauseFx committed Jun 11, 2015
1 parent 8327f02 commit 06b682d
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion spec/spec_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -15,4 +15,11 @@ module SpecHelper

unless ENV["DEBUG"]
$stdout = File.open("/tmp/spaceship_tests", "w")
end
end

RSpec.configure do |config|
config.after(:each) do
cache_path = "/tmp/spaceship_api_key.txt"
File.delete(cache_path) rescue nil # to not break the actual spaceship
end
end

0 comments on commit 06b682d

Please sign in to comment.