Failure is inevitable


SpecsFor and SpecsFor.Mvc Updated!

Thanks to some nice pull requests by Gheorghe Bulicanu, both SpecsFor and SpecsFor.Mvc have been updated! SpecsFor 5.0.1 fixes the annoying issue regarding incompatibility with NUnit 3.0. The SpecsFor now correctly restricts to versions less than 3.0 (which isn't currently supported.) SpecsFor.Mvc 4.8.0 includes updated Selenium WebDriver support, which will work with the latest versions of Chrome and IE. Both packages are available on NuGet now. Thanks again, Gheorghe, for the pull requests!

A Simple Trick to View Data in SQL Server While Your Specs Are Running

It’s ridiculously easy to do integration testing against Entity Framework and a real database when you are using SpecsFor.   I use SpecsFor to do all my integration testing.   But it occurred to me that I’ve never publicly documented one of the common tricks I use: viewing data in the test database while the specs are running. More...

SpecsFor, SpecsFor<Web> Helpers, and SpecsFor<Mvc> All Updated!

There are lots of small fixes and improvements across the SpecsFor suite today.  Let’s take a look! More...

SpecsFor Updates!

New versions of both SpecsFor.Web.Helpers and SpecsFor.Mvc rolled out this week, thanks to the contributions of two users from the community. More...

SpecsFor - Better Partial Matching for Dates

I just shipped a small update to SpecsFor that improves the partial-matching story when dealing with dates. More...

Using SpecsFor.Mvc with Windows Authentication

Numerous people have requested that I put together a sample that illustrates how to use SpecsFor.Mvc with Windows Authentication.  Guess what’s in this post? More...

SpecsFor.Mvc 4.5.0 Released!

A new build of SpecsFor.Mvc is now available on NuGet!  This release was made possible by contributions from the community, so a big “Thank You!” goes out to henkeson and neuhoffm!  Their contributions added support for: Project configurations that have non-standard solution locations (just call Solution.Named() or pass in the path to your solution directly!) UrlShouldMapTo and UrlMapsTo are now case-insensitive by default, but you can change this behavior if you want! You can change the Output path, which makes it possible to use SpecsFor.Mvc with multiple web projects at once! BrowserDriver’s constructor is now public, so you can configure your own instance of BrowserDriver! Oh, and there’s an updated ReSharper templates package available, too, that works with ReSharper 9.1.    As usual, let me know if there are any problems!

SpecsFor.Mvc Updated (again!)

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! More...

SpecsFor.Mvc and SpecsFor<Web> Helpers updated!

There are two new releases on the SpecsFor front today.  First, thanks to Neuhoffm again, SpecsFor.Mvc now supports radio buttons properly.  You can “check” a radio button by string value or by using a strongly-typed value: SUT.FindFormFor<Task>() .Field(m => m.Title).SetValueTo("use radio buttons") //By string... .Field(m => m.Complete, "false").Click() .Submit(); SUT.FindFormFor<Task>() .Field(m => m.Title).SetValueTo("use radio buttons") .Field(m => m.Complete, true).Click() //Or by strongly-typed value! .Field(m => m.Priority, Priority.High).Click() .Submit(); You can check out this change in the 4.3.0 release. Next, there’s a preview release of SpecsFor<Web> Helpers out today.  It adds support for fake ControllerContext, and you can easily wire this up on your controller specs like so: public class when_initializing_the_SUT_with_a_fake_controller : SpecsFor<DummyController> { protected override void When() { this.UseFakeContextForController(); GetMockFor<IPrincipal>() .Setup(x => x.Identity.Name) .Returns("My test!"); } [Test] public void then_it_configures_the_fake_user_correctly() { SUT.User.ShouldNotBeNull(); SUT.User.Identity.Name.ShouldEqual("My test!"); } } Note that SpecsFor<Web> Helpers 1.5.0  is currently in pre-release form.  I nuked FakePrinciple and FakeIdentity as part of this change as they seemed unnecessary.  If anyone can make a strong argument for why they should be kept, let me know, otherwise, this change will become final later this week. As always, let me know if you run into any problems!

SpecsFor.Mvc 4.2.0 Released!

There’s a new build of SpecsFor.Mvc available on NuGet tonight!  This version adds support for navigating to controllers within areas that are decorated with the RouteAreaAttribute class.  Now you can do things like NavigateTo<TController>() against controllers that are in areas without using the MvcFuture’s ActionLinkAreaAttribute. My thanks go out to Neuhoffm for this improvement!