Daily Usage Issues

139b ... doesn't seem to honour machine.specifications.ignore attribute

Started by vurt007 on 11,851 views

as the title says really

I'm getting test failure reports for ignored tests .

using
vs2010
mspec 0.5.0 according the the properties
Hi, thanks for reporting this problem. I've managed to reproduce this myself and can confirm that NCrunch is not respecting MSpec's ignore attribute. I'll make a note to fix this in an upcoming release. As a workaround, I suggest you also ignore your MSpec tests using the NCrunch Tests Window for the time being.


Thanks!

Remco
This post has been deleted.
For anyone interested, 1.40b (just released) includes a fix for this issue.
Hi,

It seems NCrunch is still ignoring the Ignore attribute for MSpec tests.

Here is the test failing. I have tried the Ignore attribute with and without a reason.

[Ignore("reason")]
public class when_mergin_a_template_with_a_null_object
{
private static ITemplateEngine template_engine;
private static ITemplateFile template_file;
private static string output;
private static Exception exception;

private Establish context = () =>
{
template_engine = TemplateEngineHelper.CreateTestNVelocityEngine();
template_file = template_engine.CreateTemplateFile("dummy");
};

private Because of = () =>
{
exception = Catch.Exception(() => template_engine.Merge(template_file, null));
};

private It should_throw_an_exception = () => exception.ShouldNotBeNull();
}

Here is a screenshot of the NCrunch output External image

Or am I just being thick?


I am using NCrunch 1.41.0.50b with Visual Studio 2012 and MSpec 0.5.8.0.

Thanks
Hi,

Thanks for posting!

I just tried this use case locally and was unable to reproduce the problem (the test was ignored for me).

Is there any extra complexity around this test that is not shown in your code snippet?

Can you confirm that the ignore attribute you're using is Machine.Specifications.IgnoreAttribute?
Thank you for the quick reply.

For some reason the ignore is working now. I am very sure it was ignored yesterday, or maybe I am just getting old.

Apologies for the red herring!
It's possible this could have been a synchronisation issue of some kind. Perhaps you added the ignore attribute and NCrunch didn't properly pick it up until the engine was reset. I guess there's no way to know now, but I'm glad it's working for you!

Cheers,

Remco
This post has been deleted.

Post a reply

Log in to reply.