diff --git a/lib/database_cleaner/safeguard.rb b/lib/database_cleaner/safeguard.rb index 353d0a7d..26646791 100644 --- a/lib/database_cleaner/safeguard.rb +++ b/lib/database_cleaner/safeguard.rb @@ -53,12 +53,11 @@ def given? def remote?(url) return false unless url - parsed = URI.parse(url) return false if parsed.scheme == 'sqlite3:' host = parsed.host - return false unless host + return false if host.nil? || host.empty? return false if LOCAL.include?(host) return false if host.end_with? '.local' true