Class: Rex::Test

Inherits:
Object
  • Object
show all
Defined in:
lib/rex/test.rb

Class Method Summary collapse

Class Method Details

.cantmockObject


27
28
29
30
31
# File 'lib/rex/test.rb', line 27

def self.cantmock()
    if (!$_REX_TEST_NO_MOCK)
        raise RuntimeError, "*** $_REX_TEST_NO_MOCK must not be set for this test ***", caller
    end
end

.loadObject

overwrite test defaults with rex/test-config.rb


15
16
17
18
19
20
21
22
23
24
25
# File 'lib/rex/test.rb', line 15

def self.load()
    file = File.join( ENV.fetch('HOME'), '.msf3', 'test')
    begin
        if File.stat(file + '.rb')
            require file
        end
    rescue
        # just ignore the errors
    end

end