Daily Usage Issues

Unimplemented tests in MSpec treated as failed

Started by jeffwalker on 6,026 views

In MSpec, when you leave a test unimplemented, they should be ignored. NCrunch treats them as failing.

For instance:


    [Subject("story")]
    public class when_scenario : ScenarioObjects {
        Establish context = () => {};

        Because action = () => {
            sut.SomeAction()
        };

        It should_be_ignored;
        It should_pass = () => {};
        It should_fail =()=> { throw new Exception(); }
    }


The test "should_be_ignored" should be treated as ignored. Both the command-line MSpec runner and the Resharper test runner does this correctly.

I am running 1.40b on Visual Studio 2010 with C#, .net 4, MSpec 0.4.23.0, and Resharper 6.1.

Thanks.

Jeff

Edited

Hi Jeff -

There are conflicting views on what should be the correct behaviour of NCrunch in this specific situation. A previous forum thread should hopefully provide some more details around this.

The current implementation is to consider the test as inconclusive, in which case the outcome of the test is configurable via a project-level setting (the default of which is to consider the test as failed).


Cheers,

Remco

Post a reply

Log in to reply.