Swithing to MSpec

After finished JP’s NBDN course, we decide to switch to MSpec to fully implement BDD because it’s clean setup and well document style. The classic setup and teardown style has too many keystroke when dealing with the class with more dependencies.

  1. Download the recent build from teamcity.codebetter.com, extract it somewhere.
  2. Add Machine.Specificatino.dll into demo project reference.
  3. Run  InstallResharperRunner.XX.bat to enable R# launch MSpec.
  4. Create a demo class using the example code from Aaron Jenson’ blog.   the code from MSpec 0.1 post  is too old, syntax has been changed since, use code from MSpec 0.2 post instead.


The things I like from MSpec:

  • Work very well with Resharper Runner plugin in VS.
  • The underscores is gone from report.
  • I don’t even need NUnit in project reference.

Some differences from the doc:

  • mspec-runner.exe changed to mspec.exe in the release package.
  • out file needs a path in mspec command line.

Next, I should figure out how does this fi
t into cruisecontrol.net, it can generate xml file like this, hope the next release will contain a default xsl for it.












Update on Mar. 16, 2011

Downloaded and Installed MSpec 0.4, got error about loadFromRemoteSource while VS trying to load plugins from network drive, the solution on stackoverflow of hacking config file didn’t work, my workaround is just copying those dlls into C:\Program Files\JetBrains\ReSharper\v5.1\Bin\Plugins.

About clean up R# warning, tweek from Aaron Jensen’s post can fix most of them,I have add some more :

 

The new command MSpec.exe/MSpec-clr4.exe come with –html option which can generate nice html output.

Advertisements