Skip to content

Instantly share code, notes, and snippets.

@thecodejunkie
Created March 22, 2011 16:44
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save thecodejunkie/881542 to your computer and use it in GitHub Desktop.
Save thecodejunkie/881542 to your computer and use it in GitHub Desktop.
Spike of Nancy test harness
public class BrowserFixture
{
private readonly Browser browser;
public BrowserFixture()
{
var bootstrapper =
new FakeDefaultNancyBootstrapper();
this.browser = new Browser(bootstrapper);
}
[Fact]
public void Should_just_work_got_damit()
{
var response = browser.Get("/", (with) => {
with.Header("Content-Length", "0");
with.Header("Accepted-Type", "text/plain");
with.HttpRequest();
});
response.StatusCode.ShouldEqual(HttpStatusCode.OK);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment