Create a gist now

Instantly share code, notes, and snippets.

What would you like to do?
public void Should_get_posts_and_show_a_view()
var repo = MockRepository.GenerateStub<IPostsRepository>();
var results = new List<Post>();
var stats = new RavenQueryStatistics
TotalResults = 20
repo.Stub(r => r.QueryPostStats(1, 2, 3, out results)).Return(stats);
var controller = new PostsController(repo);
var result = controller.Archive(1, 2, 3) as ViewResult;
result.ShouldNotBeNull("Should be a view result");
// etc
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment