2014-12-06 03:26:50 +11:00
|
|
|
Before do
|
|
|
|
FileUtils.rm_rf(TEST_DIR) if File.exist?(TEST_DIR)
|
|
|
|
FileUtils.mkdir_p(TEST_DIR)
|
2014-12-06 10:55:10 +11:00
|
|
|
|
2016-09-26 05:23:06 +10:00
|
|
|
test_site = File.expand_path('../../test-site', __FILE__)
|
|
|
|
FileUtils.cp_r(Dir.glob("#{test_site}/*"), TEST_DIR)
|
2014-12-06 10:55:10 +11:00
|
|
|
|
2014-12-06 03:26:50 +11:00
|
|
|
Dir.chdir(TEST_DIR)
|
|
|
|
end
|
|
|
|
|
2014-12-06 10:55:10 +11:00
|
|
|
at_exit do
|
2014-12-06 03:26:50 +11:00
|
|
|
FileUtils.rm_rf(TEST_DIR) if File.exist?(TEST_DIR)
|
|
|
|
end
|