Skip to content

Commit

Permalink
Create DB in temp folder
Browse files Browse the repository at this point in the history
  • Loading branch information
lovro-bikic committed Oct 9, 2024
1 parent 345f2dc commit bf63fa9
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions spec/spec_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -15,4 +15,15 @@
config.expect_with :rspec do |c|
c.syntax = :expect
end

database_path = File.join(__dir__, '../tmp/database')

config.before(:suite) do
FileUtils.rm_rf([database_path])
system 'git', 'clone', '--quiet', Bundler::Audit::Database::URL, database_path
end

config.before do
stub_const('Bundler::Audit::Database::DEFAULT_PATH', database_path)
end
end

0 comments on commit bf63fa9

Please sign in to comment.