views:

49

answers:

1

I've got the latest mspec from the codebetter teamcity site and installed the Resharper5.1 runner as suggested. The runner and the annotations show up fine in the resharper option dialogs.

Now even with the annotations library ticked I still get "field xxx is never used" warnings everywhere and when I ask resharper to run all tests in the solution it doesn't seem to find my specifications.

I have unblocked the dlls.

Using resharper 5.1.

+1  A: 

"Field xyz is never used" warnings only go away for classes that have the Subject attribute applied. If you don't use Subject you can work around the issue by disabling warning 169 in your spec projects.

Some questions about your issues with solution runs:

  1. Did your enable MSpec under ReSharper | Options | Unit Testing?
  2. Do specification runs for projects (as opposed to solution runs) work for you?
  3. Can you start specifications by clicking the green/yellow icon in the gutter?
  4. Does the Unit Text Explorer window correctly reflect the solution's contexts and specifications?
Alexander Groß
Adding the subject attribute worked for the warning thanks. To answer your questions...1. Yes it is enabled here2. No, if I click the "Run Unit Tests" option I get a "No tests found in file" error3. I don't get the gutter icons4. It is completely empty
Chris Meek
Are your context classes declared as `public`? You can try running your contexts with TestDriven.Net to see if it works with this runner. If it doesn't there's some larger problem. To use TD.Net, install it and drop the `MSpec.tdnet` file in the same folder where `MSpec.dll` resides.
Alexander Groß
Thanks Alexander, setting the class to public seems to have done the trick.
Chris Meek

related questions