Skip to content

Instantly share code, notes, and snippets.

@ryansroberts
Forked from johnnonolan/readable.cs
Created January 14, 2011 21:54
Show Gist options
  • Save ryansroberts/780334 to your computer and use it in GitHub Desktop.
Save ryansroberts/780334 to your computer and use it in GitHub Desktop.
namespace iDoc.specs.When
{
[Subject("AcccountManagement")]
public class CreatingAUserAccount : with_controller<AccountController,AccountResource>
{
static string sentto;
Establish context = () =>
{
Mock<IEmailProvider>.Send(It.IsAny<etc>)
.CallBack((EmailModel model) => emailaddress = model.emailaddress)
};
Because of = () => post("accounts/create",new EmailModelThing {Email = "[email protected]"})
It should_send_an_email = () => sentto.ShouldEqual("[email protected]")
It is_account_resource =()=> Resource.ShouldBe(typeof(AccountResource));
It should_show_a_signed_in_successfully_message = () => Resource.Message.ShouldEqual("its ok");
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment