diff --git a/spec/lib/metasploit/framework/database_spec.rb b/spec/lib/metasploit/framework/database_spec.rb index 3abdf6dcca..d57b44fb91 100644 --- a/spec/lib/metasploit/framework/database_spec.rb +++ b/spec/lib/metasploit/framework/database_spec.rb @@ -619,6 +619,10 @@ RSpec.describe Metasploit::Framework::Database do end context 'without MSF_DATABASE_CONFIG' do + before(:each) do + ENV.delete('MSF_DATABASE_CONFIG') + end + it { is_expected.to be_nil } end end @@ -667,4 +671,4 @@ RSpec.describe Metasploit::Framework::Database do expect(user_configurations_pathname).to eq(Pathname.new(config_root).join('database.yml')) end end -end \ No newline at end of file +end