Skip to content

Commit 478cd2e

Browse files
committed
check database.yml path
1 parent 5a0e11f commit 478cd2e

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

spec/spec_helper.rb

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,9 @@
1111
# Must be explicit as activerecord is optional dependency
1212
require 'active_record/railtie'
1313

14-
unless File.exist?('config/database.yml') || File.exist?(File.expand_path('~/.msf4/database.yml'))
14+
require 'metasploit/framework/database'
15+
# check if database.yml is present
16+
unless Metasploit::Framework::Database.configurations_pathname.try(:to_path)
1517
fail 'RSPEC currently needs a configured database'
1618
end
1719

0 commit comments

Comments
 (0)