SpecsFor 8.0.0-beta01
See the version list below for details.
dotnet add package SpecsFor --version 8.0.0-beta01
NuGet\Install-Package SpecsFor -Version 8.0.0-beta01
<PackageReference Include="SpecsFor" Version="8.0.0-beta01" />
<PackageVersion Include="SpecsFor" Version="8.0.0-beta01" />
<PackageReference Include="SpecsFor" />
paket add SpecsFor --version 8.0.0-beta01
#r "nuget: SpecsFor, 8.0.0-beta01"
#:package SpecsFor@8.0.0-beta01
#addin nuget:?package=SpecsFor&version=8.0.0-beta01&prerelease
#tool nuget:?package=SpecsFor&version=8.0.0-beta01&prerelease
Project Description
SpecsFor is another Behavior-Driven Development framework that focuses on ease of use for developers by minimizing testing friction.
Main Features
SpecsFor is a Behavior-Driven Development style framework that puts developer productivity ahead of all other goals. The current release features:
- AutoMocking - Easily configure and verify behavior.
- ReSharper Live Templates - Quickly create specs with only a few keystrokes.
- Clean Separation of Test State - Encapsulate test setup and reuse it across as many specs as you like. Run The Same Specs Multiple Times With Different Contexts - SpecsFor allows you to assert the same things are true given any number of contexts.
- Mix And Match Contexts - Context can be combined and extended to support complex test setup without code duplication or excess noise in your specs.
- Declarative Context - Context can be established in many ways, including by simply marking your spec class with a special attribute.
- Works With Any NUnit Test Runner - No add-ins are needed, SpecsFor is fully compatible with all popular test runners including TestDriven.NET, Resharper, and TeamCity.
Examples
[Given(typeof(TheCarIsNotRunning), typeof(TheCarIsParked))]
[Given(typeof(TheCarIsNotRunning))]
public class when_the_key_is_turned : SpecsFor<Car>
{
public when_the_key_is_turned(Type[] context) : base(context){}
protected override void When()
{
SUT.TurnKey();
}
[Test]
public void then_it_starts_the_engine()
{
GetMockFor<IEngine>()
.Verify(e => e.Start());
}
}
public class when_the_key_is_turned_alternate_style : SpecsFor<Car>
{
protected override void Given()
{
Given<TheCarIsNotRunning>();
Given<TheCarIsParked>();
base.Given();
}
protected override void When()
{
SUT.TurnKey();
}
[Test]
public void then_it_starts_the_engine()
{
GetMockFor<IEngine>()
.Verify(e => e.Start());
}
}
SpecsFor In Action
Check out the docs at http://specsfor.readme.io
Check out the current version in action: http://www.youtube.com/watch?v=MVwguBsR6eA
See an earlier prototype of SpecsFor in action: http://www.youtube.com/view_play_list?p=982492E9FAE3F64A
Read more about SpecsFor at http://trycatchfail.com/blog
Learn more about Target Frameworks and .NET Standard.
-
- SpecsFor.StructureMap (>= 8.0.0-beta01)
NuGet packages (1)
Showing the top 1 NuGet packages that depend on SpecsFor:
| Package | Downloads |
|---|---|
|
SpecsFor.Helpers.Web
Would you like to write simple and clean specs around your ASP.NET MVC controllers, filters, and helpers? All you need is SpecsFor and this package! |
GitHub repositories (2)
Showing the top 2 popular GitHub repositories that depend on SpecsFor:
| Repository | Stars |
|---|---|
|
MattHoneycutt/SpecsFor
SpecsFor is a light-weight Behavior-Driven Development framework that focuses on ease of use for *developers* by minimizing testing friction.
|
|
|
nhibernate/NHibernate.AspNet.Identity
ASP.NET Identity Provider for NHibernate
|
| Version | Downloads | Last Updated |
|---|---|---|
| 8.0.0-rc3 | 190 | 10/26/2026 |
| 8.0.0-rc2a | 1,504 | 8/21/2025 |
| 8.0.0-rc1b | 712 | 7/8/2025 |
| 8.0.0-rc1a | 714 | 6/30/2025 |
| 8.0.0-rc1 | 765 | 4/11/2025 |
| 8.0.0-beta01 | 1,115 | 3/25/2025 |
| 7.1.0 | 110,401 | 5/25/2021 |
| 7.0.0 | 93,348 | 10/24/2018 |
| 7.0.0-rc2 | 2,998 | 9/18/2018 |
| 7.0.0-rc1 | 2,784 | 9/17/2018 |
| 7.0.0-beta1 | 2,719 | 9/7/2018 |
| 6.0.0 | 16,947 | 9/5/2018 |
| 6.0.0-alpha02 | 2,141 | 5/18/2018 |
| 5.0.1 | 63,904 | 2/23/2017 |
| 5.0.0 | 42,574 | 4/8/2016 |
| 4.5.0 | 7,541 | 3/17/2016 |
| 4.4.0 | 6,244 | 1/8/2016 |
| 4.3.2 | 11,290 | 7/24/2015 |
| 4.3.1 | 33,561 | 1/26/2015 |
| 4.3.0 | 2,771 | 1/11/2015 |
See updates for SpecsFor.StructureMap for details.