diff --git a/spec/spec_helper.rb b/spec/spec_helper.rb index f123c3e..747ffdf 100644 --- a/spec/spec_helper.rb +++ b/spec/spec_helper.rb @@ -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