Skip to content

Commit

Permalink
added icon, started class level before
Browse files Browse the repository at this point in the history
  • Loading branch information
amirrajan committed Mar 23, 2011
1 parent a33e1b0 commit 111a5ee
Show file tree
Hide file tree
Showing 3 changed files with 31 additions and 0 deletions.
1 change: 1 addition & 0 deletions SampleSpecs/SampleSpecs.csproj
Expand Up @@ -49,6 +49,7 @@
<Compile Include="Properties\AssemblyInfo.cs" />
<Compile Include="Demo\User.cs" />
<Compile Include="Model\Car.cs" />
<Compile Include="WebSite\class_level_before.cs" />
<Compile Include="WebSite\describe_car.cs" />
<Compile Include="WebSite\describe_Math.cs" />
<Compile Include="WebSite\describe_PrimeFactors.cs" />
Expand Down
30 changes: 30 additions & 0 deletions SampleSpecs/WebSite/class_level_before.cs
@@ -0,0 +1,30 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using NSpec;

namespace SampleSpecs.WebSite
{
class class_level_before : nspec
{
List<int> ints = null;

before<dynamic> each = (s) =>
{
s.ints = new List<int>();
};

public void list_manipulations()
{
specify = () => ints.Count.should_be(0);

context["number in collection"] = () =>
{
before = () => ints.Add(15);
specify = () => ints.Count.should_be(1);
};
}
}
}
Binary file added icon.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 111a5ee

Please sign in to comment.