Skip to content

Instantly share code, notes, and snippets.

@johnnonolan
Created July 21, 2010 13:34
Show Gist options
  • Save johnnonolan/484488 to your computer and use it in GitHub Desktop.
Save johnnonolan/484488 to your computer and use it in GitHub Desktop.
namespace When
{
[Subject(typeof())]
public class Figuring_out_mSpec
{
It should_be_unspeced_here;
It should_fail_here_too = () =>
returnFalse().ShouldBeFalse(); // ShouldBeFalse is an extension method in mspec.
It should_pass_here = () =>
s.Contains("o").ShouldBeTrue(); // ShouldBeTrue is an extension method in mspec.
static string s = "John";
static void noop() {}
static bool returnFalse(){return false;}
}
}
@johnnonolan
Copy link
Author

The problem was you were assuming that http://jagregory.com/writings/behaviours-in-mspec/ shouldBetrue was part of the IVehicle contract.

@johnnonolan
Copy link
Author

The delegate It is just a void returning function (or procedure as they used to say in my day).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment