Disclaimer The opinions expressed herein are my own personal opinions and do not represent my employer's view in anyway.
© Copyright 2012, Eleutian Technology
E-mail
It's been a while, but we've gotten several new things into Machine.Specifications (MSpec). I'm excited to finally release them for everyone to start playing with. You can grab the bits here.
Let's talk about what's new though. Here's an example of a new context/spec:
[Concern("Console runner")] public class when_specifying_a_missing_assembly_on_the_command_line { Establish context = ()=> { console = new FakeConsole(); program = new Program(console); }; Because of = ()=> exitCode = program.Run(new string[] {missingAssemblyName}); It should_output_an_error_message_with_the_name_of_the_missing_assembly = ()=> console.Lines.ShouldContain(string.Format(Resources.MissingAssemblyError, missingAssemblyName)); It should_return_the_Error_exit_code = ()=> exitCode.ShouldEqual(ExitCode.Error); const string missingAssemblyName = "Some.Missing.Assembly.dll"; public static ExitCode exitCode; public static Program program; public static FakeConsole console; }
There have been a few semantic changes
There is now a console runner
We don't quite have all the options we want yet, but the basics of the runner are working. Here's the help from the runner:
We also stole Bellware's SpecUnit.NET reporting stuff and ported it over. You can now generate a report on your specs with the --html switch. Here's an example run:
This is the report it generates.
Want to try it out?
Also, this is part of Machine, so feel free to take a look at the code and/or submit patches. There's also a Gallio adapter in there, but I didn't include it in the release as it's not quite polished enough yet. If you're interested in it, talk to me. Special thanks to Scott Bellware, Jeff Brown and Jamie Cansdale for their help and support. Also, extra special thanks to Eleutian's newest dev, Jeff Olson for much of the recent work that has gone into MSpec!