From ad7deee2cb8f8fdbba52b8cd604d63de319898cb Mon Sep 17 00:00:00 2001 From: Nathan Heskew Date: Tue, 30 Nov 2010 08:35:34 -0800 Subject: [PATCH] Fixing some spec tests --HG-- branch : dev --- src/Orchard.Specs/Bindings/OrchardSiteFactory.cs | 7 ++++--- src/Orchard.Specs/Bindings/WebAppHosting.cs | 10 ++++++++-- 2 files changed, 12 insertions(+), 5 deletions(-) diff --git a/src/Orchard.Specs/Bindings/OrchardSiteFactory.cs b/src/Orchard.Specs/Bindings/OrchardSiteFactory.cs index 972750f32..d9fde2601 100644 --- a/src/Orchard.Specs/Bindings/OrchardSiteFactory.cs +++ b/src/Orchard.Specs/Bindings/OrchardSiteFactory.cs @@ -17,11 +17,12 @@ namespace Orchard.Specs.Bindings { public void GivenIHaveInstalledOrchard(string virtualDirectory) { var webApp = Binding(); - 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"); diff --git a/src/Orchard.Specs/Bindings/WebAppHosting.cs b/src/Orchard.Specs/Bindings/WebAppHosting.cs index ce2712f31..580ac4236 100644 --- a/src/Orchard.Specs/Bindings/WebAppHosting.cs +++ b/src/Orchard.Specs/Bindings/WebAppHosting.cs @@ -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())) {