mspec

How to integrate MSpec with MS Build?

Hi, Few days ago I watched a BDD screencast by Rob Conery. In the video he showed how to use MSpec, so I downloaded it and played with the bits. What I want now is to integrate MSpec with MS Build, but I don't know how... I use TFS team build as my CI server - Can you help me to integrate MSpec with MSBuild? Thanks! ...

BDD and MSpec, am I approaching this right?

Hi guys, Just wondering if any MSpec and BDDers out there could give me there thoughts on my first attempt at writing a MSpec spec. Now I've left the specs uncoded, but my context has code in it, I just want to know if I'm heading along the right lines, or if there are any improvements to be made with what I've done. As this can be sub...

Generate Manager Report from Unit Tests (Visual Studio)

Is it possible to generate a report from Visual Studio 2008's integrated unit tests? Say, one you hand off to an account manager to include in an invoice for the client. One that looks say 10% as good as this? I ask because Rob Conery made a great video about using BDD to develop applications. And within it, he uses a 3rd party fra...

ReSharper doesn't see my Machine.Specification tests

I'm having a problem getting ReSharper to see the Machine.Specification "tests" I've written. The specs run in the ConsoleRunner from mSpec. When I try to "Run Unit Tests" in ReSharper, I get a message: "No tests found in file." The specs don't show the test markers. I created a folder in the ReSharper /bin/ folder and put the proper ....

TeamCity & MSpec with sln2008 runner?

I'm currently using the sln2008 runner. Is there a way to configure TeamCity to execute MSpec tests without switching to a NAnt or MSBuild runner? ...

How to install MSpec BDD Framework?

Does anyone know if there is an MSpec installer with R# and/or TestDriven.NET support? ...

How to BDD with GWT using MSpec? The correct way to write this scenario...

I'm just starting to practice BDD using the GWT approach to the following code exert and just realised that I can't do the second test. My GWT goes something like Given there exists an open query When the user replies to the query Then it should save the reply if the reply is not blank Then it should notify the user and not save the ...

R6034 When Calling SMO ExecuteNonQuery Under Machine.Specifications.ConsoleRunner

I'm using Sql Server Management Objects (SMO) in my integration tests. When I run them from Visual Studio (using TestDriven.NET or Resharper) there's no problem. But when I run from Machine.Specifications.ConsoleRunner.exe the code stops and I get this Windows dialog: R6034 - The application has made an attempt to load the C run...

ASP.NET MVC tests with MSpec. Is this correct or needs refactoring ?

Hello, I'm new to MSpec and would like to know if the way I wrote my test for ASP.NET MVC is correct. The test passes but I don't really like the way it's written and it seems awkward. I'm certainly missing something. public class AccountControllerTests3 { protected static AccountController controller; static IFormsAuthenticati...

How to write specs with MSpec for code that changes Thread.CurrentPrincipal?

I've been converting some old specs to MSpec (were using NUnit/SpecUnit). The specs are for a view model, and the view model in question does some custom security checking. We have a helper method in our specs which will setup fake security credentials for the Thread.CurrentPrincipal. This worked fine in the old unit tests, but fails ...

Spec fails when run by mspec.exe, but passes when run by TD.NET

I previously wrote about this topic in this question: http://stackoverflow.com/questions/2240459/how-to-write-specs-with-mspec-for-code-that-changes-thread-currentprincipal However, I've since refactored my code to get rid of configuration access, thus allowing the specs to pass. Or so I thought. They run fine from within Visual Stud...

What BDD frameworks are popular in .net?

I've recently been getting into BDD and think it holds great promise as a way to get a stakeholder's voice back in the apps we, as developers, create for them. What's your favorite BDD framework and why? ...

When using a mocking framework and MSPEC where do you set your stubs

I am relatively new to using MSpec and as I write more and more tests it becomes obvious to reduce duplication you often have to use a base class for your setup as per Rob Conery's article I am happy with using the AssertWasCalled method to verify my expectations, but where do you set up a stub's return value, I find it useful to set th...

Use MSpec with MBUnit?

Hi, Does anyone know if it's possible to use MSpec with MBUnit instead of NUnit? Gallio seems to ignore all my tests when using MSpec? ...

Is mspec better with or without nunit?

I've seen mspec used with nunit on some blogs and discussions. In fact, most of the examples on the web that I've seen demonstrate mspec with some kind of nunit dependancy or integration. My team is attempting to use mspec without nunit on a new ASP.NET MVC2 project. We're not at the spec-writing stage yet, so I can't tell what is better...

Testing Finite State Machines

I have inherited a large and firaly complex state machine at work. It has 31 possbile states to be in. It has the following inputs: Enum: Current State (so 0 -> 30) Enum: source (currently only 2 entries) Boolean: Request Boolean: type Enum: Status (3 states) Enum: Handling (3 states) Boolean: Completed The 31 States are really nee...

Reharper runner plugins for xunit and mspec simultaniously

I have successfully used the Resharper 4.5 runner for xunit tests in vs2008. Now I want to try out MSpec and I want to use the Resharper 4.5 runner for MSpec. But I have them both installed I get an error message when starting Visual Studio, that a plugin can not be loaded, because there is already a plugin with the same name loaded. Is...

NullReferenceException when testing DefaultModelBinder.

I'm developing a project using BDD/TDD techniques and I'm trying my best to stay the course. A problem I just ran into is unit testing the DefaultModelBinder. I'm using mspec to write my tests. I have a class like this that I want to bind to: public class EmailMessageInput : IMessageInput { public object Recipient ...

Is it possible to have mspec & NUnit tests in a single project

I've got a unit test project using NUnit. When I add the mspec (machine.specifications) assembly to the references, both ReSharper and TestDriven.Net stop running the NUnit tests and only run the mspec tests. Is there a way or setting that allows both NUnit & mspec tests to co-exist and run in the same project using R# & TD.Net test run...

Help configuring MSpec

rig: win7 64bit, vs2010, mvc v2, TestDriven.Net 3.0, Reshaper 5.0, MSpec 0.3 i recently started a new project and want to use mspec. (1) copied Machine.Specifications.ReSharperRunner.5.0.dll and Machine.Specifications.dll to JetBrains\ReSharper\5.0\Bin\Plugins\Machine.Specifications (2) copied Machine.Specifications.TDNetRunner.dll to...