Fixing some spec tests

--HG--
branch : dev
This commit is contained in:
Nathan Heskew
2010-11-30 08:35:34 -08:00
parent 47725ae961
commit ad7deee2cb
2 changed files with 12 additions and 5 deletions

View File

@@ -17,11 +17,12 @@ namespace Orchard.Specs.Bindings {
public void GivenIHaveInstalledOrchard(string virtualDirectory) {
var webApp = Binding<WebAppHosting>();
webApp.GivenIHaveACleanSiteWith(TableData(
webApp.GivenIHaveACleanSiteWith(
virtualDirectory,
TableData(
new { extension = "module", names = "Orchard.Setup, Orchard.Pages, Orchard.Blogs, Orchard.Messaging, Orchard.Modules, Orchard.Packaging, Orchard.PublishLater, Orchard.Themes, Orchard.Scripting, Orchard.Widgets, Orchard.Users, Orchard.Roles, Orchard.Comments, Orchard.jQuery, Orchard.Tags, TinyMce" },
new { extension = "core", names = "Common, Dashboard, Feeds, HomePage, Navigation, Contents, Routable, Scheduling, Settings, Shapes, XmlRpc" },
new { extension = "theme", names = "SafeMode, TheAdmin, TheThemeMachine" }),
virtualDirectory);
new { extension = "theme", names = "SafeMode, TheAdmin, TheThemeMachine" }));
webApp.WhenIGoTo("Setup");

View File

@@ -74,7 +74,7 @@ namespace Orchard.Specs.Bindings {
GivenIHaveACleanSiteBasedOn(siteFolder, "/");
}
[Given(@"I have a clean site based on (.*) at ""(.*)\""")]
[Given(@"I have a clean site based on (.*) at ""(.*)""")]
public void GivenIHaveACleanSiteBasedOn(string siteFolder, string virtualDirectory) {
_webHost = new WebHost(_orchardTemp);
Host.Initialize(siteFolder, virtualDirectory ?? "/");
@@ -129,7 +129,13 @@ namespace Orchard.Specs.Bindings {
}
[Given(@"I have a clean site with")]
public void GivenIHaveACleanSiteWith(Table table, string virtualDirectory = "/") {
public void GivenIHaveACleanSiteWith(Table table) {
GivenIHaveACleanSiteWith("/", table);
}
[Given(@"I have a clean site at ""(.*)"" with")]
public void GivenIHaveACleanSiteWith(string virtualDirectory, Table table) {
GivenIHaveACleanSite(virtualDirectory);
foreach (var row in table.Rows) {
foreach (var name in row["names"].Split(',').Select(x => x.Trim())) {