Skip to content

Instantly share code, notes, and snippets.

@stevenharman
Created May 20, 2010 21:41
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save stevenharman/408146 to your computer and use it in GitHub Desktop.
Save stevenharman/408146 to your computer and use it in GitHub Desktop.
public class when_creating_a_new_pie : concerns
{
private ViewResultBase _result;
protected override void context()
{
var controller = new PieController();
_result = controller.Create(new CreatePieCommand()) as ViewResultBase;
}
[Specification]
public void require_a_flavor()
{
_result.ViewData.ModelState["flavor"].Errors.ShouldNotBeEmpty();
}
public class CreatePieCommand
{
[Required]
public string flavor { get; set; }
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment