SpecsFor 8.0.0-beta01
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" />
paket add SpecsFor --version 8.0.0-beta01
#r "nuget: SpecsFor, 8.0.0-beta01"
// Install SpecsFor as a Cake Addin #addin nuget:?package=SpecsFor&version=8.0.0-beta01&prerelease // Install SpecsFor as a Cake Tool #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-beta01 | 42 | 3/25/2025 |
7.1.0 | 66,725 | 5/25/2021 |
7.0.0 | 81,680 | 10/24/2018 |
7.0.0-rc2 | 2,232 | 9/18/2018 |
7.0.0-rc1 | 2,044 | 9/17/2018 |
7.0.0-beta1 | 1,971 | 9/7/2018 |
6.0.0 | 14,910 | 9/5/2018 |
6.0.0-alpha02 | 1,548 | 5/18/2018 |
5.0.1 | 59,767 | 2/23/2017 |
5.0.0 | 39,988 | 4/8/2016 |
4.5.0 | 5,732 | 3/17/2016 |
4.4.0 | 5,455 | 1/8/2016 |
4.3.2 | 10,181 | 7/24/2015 |
4.3.1 | 26,493 | 1/26/2015 |
4.3.0 | 2,190 | 1/11/2015 |
4.3.0-RC10 | 1,430 | 1/9/2015 |
4.3.0-RC09 | 1,726 | 12/3/2014 |
4.3.0-RC08 | 1,589 | 11/28/2014 |
4.3.0-RC07 | 1,584 | 11/28/2014 |
4.3.0-RC01 | 1,591 | 11/26/2014 |
4.2.0 | 3,599 | 10/18/2014 |
4.2.0-alpha03 | 1,498 | 10/15/2014 |
4.2.0-alpha02 | 1,507 | 10/15/2014 |
4.2.0-alpha01 | 1,413 | 10/15/2014 |
4.1.0 | 5,725 | 9/5/2014 |
4.1.0-rc08 | 1,541 | 9/5/2014 |
4.1.0-rc07 | 1,572 | 9/5/2014 |
4.1.0-rc06 | 1,526 | 8/15/2014 |
4.1.0-rc05 | 1,500 | 8/15/2014 |
4.1.0-rc04 | 1,517 | 8/15/2014 |
4.1.0-rc03 | 1,595 | 8/15/2014 |
4.1.0-rc02 | 1,543 | 7/29/2014 |
4.1.0-rc01 | 1,549 | 7/25/2014 |
4.0.2 | 7,398 | 6/27/2014 |
4.0.2-alpha1 | 1,861 | 6/16/2014 |
4.0.1 | 2,187 | 6/15/2014 |
4.0.0 | 2,065 | 6/13/2014 |
4.0.0-rc1 | 1,566 | 6/11/2014 |
3.1.1-test2 | 1,584 | 5/17/2014 |
3.1.1-test1 | 1,615 | 3/28/2014 |
3.1.0 | 6,292 | 1/8/2014 |
3.0.0 | 22,279 | 3/8/2013 |
3.0.0-RC3 | 1,576 | 3/8/2013 |
3.0.0-RC2 | 1,643 | 3/8/2013 |
3.0.0-RC1 | 1,585 | 2/26/2013 |
3.0.0-preview2 | 1,673 | 1/8/2013 |
3.0.0-preview1 | 1,633 | 1/8/2013 |
2.7.0 | 3,752 | 9/16/2012 |
2.7.0-Preview1 | 1,690 | 9/15/2012 |
2.6.0 | 4,165 | 4/7/2012 |
2.6.0-alpha | 1,690 | 4/7/2012 |
2.5.0 | 2,586 | 1/20/2012 |
2.4.0 | 2,222 | 1/3/2012 |
2.3.2 | 2,275 | 12/16/2011 |
2.3.1 | 2,151 | 12/14/2011 |
2.3.0 | 2,123 | 12/14/2011 |
2.2.0 | 2,204 | 12/5/2011 |
2.1.0 | 2,160 | 11/27/2011 |
2.0.1 | 2,245 | 11/22/2011 |
2.0.0 | 2,222 | 11/18/2011 |
1.1.7 | 2,391 | 7/20/2011 |
1.1.6 | 2,324 | 6/24/2011 |
1.1.1 | 2,243 | 6/9/2011 |
1.0.66793 | 2,290 | 5/12/2011 |
1.0.66485 | 2,381 | 5/7/2011 |
1.0.65144 | 2,440 | 4/6/2011 |
1.0.0 | 2,863 | 2/26/2011 |
See updates for SpecsFor.StructureMap for details.