SpecsFor.Mvc 4.4.0 is now live!  This release includes improvements contributed by two very awesome individuals.  E-mail addresses containing a ‘+’ character now work correctly, and you can now wait for an element on a form to become visible using the fluent interface.  Read on to learn more about these changes!


First from Mark McCaigue: the stub SMTP server allows you to verify the contents of E-mail messages sent by your app, but it apparently didn’t work with addresses that used plus-addressing, which is perfectly valid.  Mark fixed that little problem for us:

public class when_a_new_user_registers_with_plus_in_email : SpecsFor<MvcWebApp>

    protected override void When()
            .Field(m => m.Email).SetValueTo("[email protected]")
            .Field(m => m.UserName).SetValueTo("Test User")
            .Field(m => m.Password).SetValueTo("[email protected]!")
            .Field(m => m.ConfirmPassword).SetValueTo("[email protected]!")

    public void then_it_sends_to_the_right_address()
        SUT.Mailbox().MailMessages[0].To[0].Address.ShouldEqual("[email protected]");

Next, from neuhoffm again, you can now wait for an element to become visible before trying to interact with it using a lambda expression.  Previously SpecsFor.Mvc only allowed you to wait for an element by using a string-based selector. 

Both of these improvements are now available in the latest NuGet package, so go check them out!

There’s more coming soon!  I’ll burn through some of the open issues ASAP, but in the mean time, remember, pull requests are welcomed! 🙂