Permalink
Browse files

Small MSpecRunner reactoring

  • Loading branch information...
1 parent 1d09fe7 commit 67a89a253cda514170a6cb1b18949e275c3183d7 @codereflection committed Jan 17, 2012
Showing with 7 additions and 4 deletions.
  1. +7 −4 src/Runners/Giles.Runner.Machine.Specifications/MSpecRunner.cs
View
11 src/Runners/Giles.Runner.Machine.Specifications/MSpecRunner.cs
@@ -30,11 +30,14 @@ private static dynamic GetRunner(SessionResults sessionResults)
{
dynamic dynamicRunListener = GetMSpecRunListener(sessionResults);
- var runOptionsType = MSpecTypes.Types.First(x => x.Name == "RunOptions");
- var runOptions = Activator.CreateInstance(runOptionsType, new string[] { }, new string[] { }, new string[] { });
-
var appDomainRunnerType = MSpecTypes.Types.First(x => x.Name == "AppDomainRunner");
- return Activator.CreateInstance(appDomainRunnerType, dynamicRunListener, runOptions);
+ return Activator.CreateInstance(appDomainRunnerType, dynamicRunListener, GetRunOptions());
+ }
+
+ static dynamic GetRunOptions()
+ {
+ var runOptionsType = MSpecTypes.Types.First(x => x.Name == "RunOptions");
+ return Activator.CreateInstance(runOptionsType, new string[] { }, new string[] { }, new string[] { });
}
private static object GetMSpecRunListener(SessionResults sessionResults)

0 comments on commit 67a89a2

Please sign in to comment.