BitSchupser
BitSchupser

Reputation: 441

Why doesn't nUnit execute my SpecsFor.Mvc tests?

I am trying to implement end to end tests using SpecsFor.Mvc. I implemented the following test:

namespace Features
{
    class AddEvents
    {

        public class when_a_user_adds_an_event: SpecsFor<MvcWebApp>
        {
            protected override void Given()
            {
                SUT.NavigateTo<HomeController>(c => c.Index());
            }
            protected override void When()
            {

                SUT.Browser.FindElementById("btn-add-event").Click();
                SUT.FindFormFor<Event>()
                    .Field(f => f.Name).SetValueTo("Alex")
                    .Field(f => f.Date).SetValueTo("01/01/2013")
                    .Submit();
            }

            [Test]
            public void then_event_should_be_added()
            {
                Assert.Fail();
            }
        }
    }
}

Problem is, that nUnit does not discover this test and reports that it did not find any tests. I had the following setup :

Any idea why this test is ignored by the test runners?

Upvotes: 1

Views: 179

Answers (1)

Charlie
Charlie

Reputation: 13736

There is an NUnit issue reported in relation to SpecsFor.MVC, see https://github.com/nunit/nunit/issues/1277

As far as we (nunit guys) can tell, SpecsFor doesn't support NUnit 3.0. However, that's based on a very cursory examination of their code. None of us are really familiar with it.

Frankly, the issue won't be moving very much unless somebody with in-depth knowledge of SpecsFor chimes in with advice.

Upvotes: 3

Related Questions