From 08f0e1055b20305c326335ef24a3fd442cb22814 Mon Sep 17 00:00:00 2001 From: Hao Kung Date: Mon, 30 Mar 2015 18:20:33 -0700 Subject: [PATCH] React to hosting changes --- test/Microsoft.AspNet.Mvc.FunctionalTests/TestHelper.cs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/test/Microsoft.AspNet.Mvc.FunctionalTests/TestHelper.cs b/test/Microsoft.AspNet.Mvc.FunctionalTests/TestHelper.cs index 2fe97df9ea..e601e8c2c3 100644 --- a/test/Microsoft.AspNet.Mvc.FunctionalTests/TestHelper.cs +++ b/test/Microsoft.AspNet.Mvc.FunctionalTests/TestHelper.cs @@ -114,7 +114,9 @@ namespace Microsoft.AspNet.Mvc.FunctionalTests applicationBasePath, applicationWebSiteName); services.AddInstance(environment); - services.AddInstance(new HostingEnvironment(environment)); + var hostingEnvironment = new HostingEnvironment(); + hostingEnvironment.Initialize(applicationBasePath, environmentName: null); + services.AddInstance(hostingEnvironment); // Injecting a custom assembly provider. Overrides AddMvc() because that uses TryAdd(). var assemblyProvider = CreateAssemblyProvider(applicationWebSiteName);