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 | 460 | 3/25/2025 |
7.1.0 | 66,956 | 5/25/2021 |
7.0.0 | 81,729 | 10/24/2018 |
7.0.0-rc2 | 2,233 | 9/18/2018 |
7.0.0-rc1 | 2,045 | 9/17/2018 |
7.0.0-beta1 | 1,972 | 9/7/2018 |
6.0.0 | 14,912 | 9/5/2018 |
6.0.0-alpha02 | 1,551 | 5/18/2018 |
5.0.1 | 59,783 | 2/23/2017 |
5.0.0 | 40,005 | 4/8/2016 |
4.5.0 | 5,740 | 3/17/2016 |
4.4.0 | 5,458 | 1/8/2016 |
4.3.2 | 10,187 | 7/24/2015 |
4.3.1 | 26,546 | 1/26/2015 |
4.3.0 | 2,192 | 1/11/2015 |
4.3.0-RC10 | 1,432 | 1/9/2015 |
4.3.0-RC09 | 1,728 | 12/3/2014 |
4.3.0-RC08 | 1,591 | 11/28/2014 |
4.3.0-RC07 | 1,586 | 11/28/2014 |
4.3.0-RC01 | 1,593 | 11/26/2014 |
4.2.0 | 3,601 | 10/18/2014 |
4.2.0-alpha03 | 1,500 | 10/15/2014 |
4.2.0-alpha02 | 1,509 | 10/15/2014 |
4.2.0-alpha01 | 1,415 | 10/15/2014 |
4.1.0 | 5,728 | 9/5/2014 |
4.1.0-rc08 | 1,543 | 9/5/2014 |
4.1.0-rc07 | 1,574 | 9/5/2014 |
4.1.0-rc06 | 1,528 | 8/15/2014 |
4.1.0-rc05 | 1,502 | 8/15/2014 |
4.1.0-rc04 | 1,519 | 8/15/2014 |
4.1.0-rc03 | 1,597 | 8/15/2014 |
4.1.0-rc02 | 1,545 | 7/29/2014 |
4.1.0-rc01 | 1,551 | 7/25/2014 |
4.0.2 | 7,401 | 6/27/2014 |
4.0.2-alpha1 | 1,864 | 6/16/2014 |
4.0.1 | 2,189 | 6/15/2014 |
4.0.0 | 2,067 | 6/13/2014 |
4.0.0-rc1 | 1,568 | 6/11/2014 |
3.1.1-test2 | 1,586 | 5/17/2014 |
3.1.1-test1 | 1,617 | 3/28/2014 |
3.1.0 | 6,299 | 1/8/2014 |
3.0.0 | 22,289 | 3/8/2013 |
3.0.0-RC3 | 1,579 | 3/8/2013 |
3.0.0-RC2 | 1,646 | 3/8/2013 |
3.0.0-RC1 | 1,588 | 2/26/2013 |
3.0.0-preview2 | 1,676 | 1/8/2013 |
3.0.0-preview1 | 1,636 | 1/8/2013 |
2.7.0 | 3,755 | 9/16/2012 |
2.7.0-Preview1 | 1,693 | 9/15/2012 |
2.6.0 | 4,168 | 4/7/2012 |
2.6.0-alpha | 1,693 | 4/7/2012 |
2.5.0 | 2,589 | 1/20/2012 |
2.4.0 | 2,225 | 1/3/2012 |
2.3.2 | 2,278 | 12/16/2011 |
2.3.1 | 2,154 | 12/14/2011 |
2.3.0 | 2,126 | 12/14/2011 |
2.2.0 | 2,207 | 12/5/2011 |
2.1.0 | 2,163 | 11/27/2011 |
2.0.1 | 2,248 | 11/22/2011 |
2.0.0 | 2,225 | 11/18/2011 |
1.1.7 | 2,394 | 7/20/2011 |
1.1.6 | 2,327 | 6/24/2011 |
1.1.1 | 2,246 | 6/9/2011 |
1.0.66793 | 2,293 | 5/12/2011 |
1.0.66485 | 2,384 | 5/7/2011 |
1.0.65144 | 2,443 | 4/6/2011 |
1.0.0 | 2,867 | 2/26/2011 |
See updates for SpecsFor.StructureMap for details.