Tag: specsfor

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…

Read More

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…

Read More

SpecsFor, SpecsFor Helpers, and SpecsFor All Updated!

There are lots of small fixes and improvements across the SpecsFor suite today.  Let’s take a look! [more] SpecsFor 4.4.0 First, the Any.NonNullValueOf partial matcher now works with nullable types! SUT.ShouldLookLike(() => new TestObject { OptionalDate = Any.NonNullValueOf<DateTime?>() }) I also added two new Should extension methods for checking IEnumerables for ascending/descending values: Assert.DoesNotThrow(() =>…

Read 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] First, Dan Patterson was kind enough to improve the Fake* objects, making it possible to simulate AJAX requests.  He added two new interfaces that can be used for configuring the behavior of the…

Read 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] Prior to this update, if you wanted to see if a DateTime value was “near” the current time, you had to do something like this: obj.ShouldLookLike(() => new TestObject { DateTimeValue = Some.ValueInRange(DateTime.Now.AddSeconds(-1), DateTime.Now) }) With version…

Read 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] Specifying your own ApplicationHost.config file for SpecsFor.Mvc to use is the secret to getting Windows Authentication to work.  I’m going to assume you’ve already got your web project configured to…

Read 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!)…

Read More

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] First from Mark McCaigue:…

Read More

SpecsFor.Mvc and SpecsFor 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…

Read More

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!

Read More