Moved DM adapter setup into first "test" method.

Since #setup is called between each test, the database table would
otherwise be cleared every time.
This commit is contained in:
soh_cah_toa
2013-07-15 02:39:41 -04:00
parent 8270abd2d5
commit d8a8e37029

View File

@@ -31,19 +31,19 @@ class TC_Dns < Test::Unit::TestCase
end
def setup
def test_1_database
DataMapper.setup(:default, 'sqlite3::memory:')
DataMapper.auto_migrate!
end
# Checks for required settings in config file
def test_1_config
def test_2_config
assert(@@dns_config.has_key?('address'))
assert(@@dns_config.has_key?('port'))
end
# Verifies public interface
def test_2_interface
def test_3_interface
@@dns = BeEF::Extension::Dns::Server.instance
assert(@@dns.respond_to?('run_server'))