Welcome Guest! To enable all features please Login or Register.

Notification

Icon
Error

Unimplemented tests in MSpec treated as failed
jeffwalker
#1 Posted : Monday, July 2, 2012 2:48:43 PM(UTC)
Rank: Newbie

Groups: Registered
Joined: 7/2/2012(UTC)
Posts: 2
Location: Memphis, TN

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

For instance:

Code:

    [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
Remco
#2 Posted : Tuesday, July 3, 2012 9:39:43 AM(UTC)
Rank: NCrunch Developer

Groups: Administrators
Joined: 4/16/2011(UTC)
Posts: 7,123

Thanks: 957 times
Was thanked: 1286 time(s) in 1193 post(s)
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
Users browsing this topic
Guest
Forum Jump  
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.

YAF | YAF © 2003-2011, Yet Another Forum.NET
This page was generated in 0.021 seconds.
Trial NCrunch
Take NCrunch for a spin
Do your fingers a favour and supercharge your testing workflow
Free Download