Some test fixes and more test temp file cleanup

--HG--
branch : dev
This commit is contained in:
Nathan Heskew
2010-11-19 23:41:33 -08:00
parent 48c8ec4571
commit 5393c5c825
10 changed files with 253 additions and 221 deletions

View File

@@ -31,21 +31,30 @@ namespace Orchard.Specs.Bindings {
[BeforeTestRun]
public static void BeforeTestRun() {
try { _orchardTemp.Delete(true).CreateDirectory(); } catch {}
try { _orchardTemp.Delete(true).CreateDirectory(); }
catch { }
}
[AfterTestRun]
public static void AfterTestRun() {
try {
_orchardTemp.Delete(true); // <- try to clear any stragglers on the way out
} catch {}
}
catch { }
}
[BeforeScenario]
public void CleanOutTheOldWebHost() {
if (_webHost != null) {
_webHost.Clean();
_webHost = null;
}
}
[AfterScenario]
public void AfterScenario() {
if (_webHost != null) {
_webHost.Dispose();
_webHost = null;
}
}