diff --git a/src/Orchard.Specs/Bindings/WebAppHosting.cs b/src/Orchard.Specs/Bindings/WebAppHosting.cs
index 26cc03dc1..3d3a6660e 100644
--- a/src/Orchard.Specs/Bindings/WebAppHosting.cs
+++ b/src/Orchard.Specs/Bindings/WebAppHosting.cs
@@ -19,6 +19,7 @@ namespace Orchard.Specs.Bindings {
private HtmlDocument _doc;
private MessageSink _messages;
private static readonly Path _orchardTemp = Path.Get(System.IO.Path.GetTempPath()).Combine("Orchard.Specs");
+ private ExtensionDeploymentOptions _moduleDeploymentOptions = ExtensionDeploymentOptions.CompiledAssembly;
public WebHost Host {
get { return _webHost; }
@@ -63,6 +64,10 @@ namespace Orchard.Specs.Bindings {
GivenIHaveACleanSiteBasedOn("Orchard.Web");
}
+ [Given(@"I have chosen to deploy modules as source files only")]
+ public void GivenIHaveChosenToDeployModulesAsSourceFilesOnly() {
+ _moduleDeploymentOptions = ExtensionDeploymentOptions.SourceCode;
+ }
[Given(@"I have a clean site based on (.*)")]
public void GivenIHaveACleanSiteBasedOn(string siteFolder) {
@@ -105,7 +110,7 @@ namespace Orchard.Specs.Bindings {
[Given(@"I have module ""(.*)""")]
public void GivenIHaveModule(string moduleName) {
- Host.CopyExtension("Modules", moduleName, ExtensionDeploymentOptions.CompiledAssembly);
+ Host.CopyExtension("Modules", moduleName, _moduleDeploymentOptions);
}
[Given(@"I have theme ""(.*)""")]
diff --git a/src/Orchard.Specs/Orchard.Specs.csproj b/src/Orchard.Specs/Orchard.Specs.csproj
index 69de2741b..748a34584 100644
--- a/src/Orchard.Specs/Orchard.Specs.csproj
+++ b/src/Orchard.Specs/Orchard.Specs.csproj
@@ -142,6 +142,12 @@
True
True
+
+
+ SiteCompilation.feature
+ True
+ True
+
@@ -222,6 +228,10 @@
SpecFlowSingleFileGenerator
ContentRights.feature.cs
+
+ SpecFlowSingleFileGenerator
+ SiteCompilation.feature.cs
+
Always
diff --git a/src/Orchard.Specs/SiteCompilation.feature b/src/Orchard.Specs/SiteCompilation.feature
new file mode 100644
index 000000000..b845f7270
--- /dev/null
+++ b/src/Orchard.Specs/SiteCompilation.feature
@@ -0,0 +1,10 @@
+Feature: The compilation of modules installed in a site
+ In order to install on Orchard site
+ As a privileged user
+ I want to have the modules compiled/installed properly
+
+Scenario: Dynamic compilation support: modules can be deployed as source files only
+ Given I have chosen to deploy modules as source files only
+ And I have installed Orchard
+ When I go to "admin"
+ Then I should see "
Orchard v(?:\.\d+){2,4}
"
diff --git a/src/Orchard.Specs/SiteCompilation.feature.cs b/src/Orchard.Specs/SiteCompilation.feature.cs
new file mode 100644
index 000000000..3fe20ad33
--- /dev/null
+++ b/src/Orchard.Specs/SiteCompilation.feature.cs
@@ -0,0 +1,76 @@
+// ------------------------------------------------------------------------------
+//
+// This code was generated by SpecFlow (http://www.specflow.org/).
+// SpecFlow Version:1.3.2.0
+// Runtime Version:4.0.30319.1
+//
+// Changes to this file may cause incorrect behavior and will be lost if
+// the code is regenerated.
+//
+// ------------------------------------------------------------------------------
+#region Designer generated code
+namespace Orchard.Specs
+{
+ using TechTalk.SpecFlow;
+
+
+ [System.CodeDom.Compiler.GeneratedCodeAttribute("TechTalk.SpecFlow", "1.3.2.0")]
+ [System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
+ [NUnit.Framework.TestFixtureAttribute()]
+ [NUnit.Framework.DescriptionAttribute("The compilation of modules installed in a site")]
+ public partial class TheCompilationOfModulesInstalledInASiteFeature
+ {
+
+ private static TechTalk.SpecFlow.ITestRunner testRunner;
+
+#line 1 "SiteCompilation.feature"
+#line hidden
+
+ [NUnit.Framework.TestFixtureSetUpAttribute()]
+ public virtual void FeatureSetup()
+ {
+ testRunner = TechTalk.SpecFlow.TestRunnerManager.GetTestRunner();
+ TechTalk.SpecFlow.FeatureInfo featureInfo = new TechTalk.SpecFlow.FeatureInfo(new System.Globalization.CultureInfo("en-US"), "The compilation of modules installed in a site", "In order to install on Orchard site\r\nAs a privileged user\r\nI want to have the mod" +
+ "ules compiled/installed properly", ((string[])(null)));
+ testRunner.OnFeatureStart(featureInfo);
+ }
+
+ [NUnit.Framework.TestFixtureTearDownAttribute()]
+ public virtual void FeatureTearDown()
+ {
+ testRunner.OnFeatureEnd();
+ testRunner = null;
+ }
+
+ public virtual void ScenarioSetup(TechTalk.SpecFlow.ScenarioInfo scenarioInfo)
+ {
+ testRunner.OnScenarioStart(scenarioInfo);
+ }
+
+ [NUnit.Framework.TearDownAttribute()]
+ public virtual void ScenarioTearDown()
+ {
+ testRunner.OnScenarioEnd();
+ }
+
+ [NUnit.Framework.TestAttribute()]
+ [NUnit.Framework.DescriptionAttribute("Dynamic compilation support: modules can be deployed as source files only")]
+ public virtual void DynamicCompilationSupportModulesCanBeDeployedAsSourceFilesOnly()
+ {
+ TechTalk.SpecFlow.ScenarioInfo scenarioInfo = new TechTalk.SpecFlow.ScenarioInfo("Dynamic compilation support: modules can be deployed as source files only", ((string[])(null)));
+#line 6
+this.ScenarioSetup(scenarioInfo);
+#line 7
+testRunner.Given("I have chosen to deploy modules as source files only");
+#line 8
+testRunner.And("I have installed Orchard");
+#line 9
+testRunner.When("I go to \"admin\"");
+#line 10
+testRunner.Then("I should see \"Orchard v(?:\\.\\d+){2,4}
\"");
+#line hidden
+ testRunner.CollectScenarioErrors();
+ }
+ }
+}
+#endregion