Skip to content

Commit

Permalink
Fix cross-contaminated specs
Browse files Browse the repository at this point in the history
  • Loading branch information
jeffgran-dox committed Jul 15, 2024
1 parent 623dcf7 commit 915dddd
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions spec/hackerone/client/asset_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,6 @@
require "spec_helper"

RSpec.describe HackerOne::Client::Asset do
let(:api) { HackerOne::Client::Api.new("github") }

before(:all) do
ENV["HACKERONE_TOKEN_NAME"] = "foo"
ENV["HACKERONE_TOKEN"] = "bar"
Expand Down Expand Up @@ -118,6 +116,11 @@
JSON2
end

after(:each) do
# clear cached programs to prevent contaminatin between tests
HackerOne::Client::Program.instance_variable_set(:@my_programs, nil)
end

let(:program) do
VCR.use_cassette(:programs) do
HackerOne::Client::Program.find("github")
Expand Down

0 comments on commit 915dddd

Please sign in to comment.