diff options
Diffstat (limited to '_build/static/archives/extend/attachments/20130413/f1b70800/attachment.html')
-rw-r--r-- | _build/static/archives/extend/attachments/20130413/f1b70800/attachment.html | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/_build/static/archives/extend/attachments/20130413/f1b70800/attachment.html b/_build/static/archives/extend/attachments/20130413/f1b70800/attachment.html new file mode 100644 index 00000000..26903184 --- /dev/null +++ b/_build/static/archives/extend/attachments/20130413/f1b70800/attachment.html @@ -0,0 +1,13 @@ +<tt> +<div dir="ltr"><br><div class="gmail_extra"><br><br><div class="gmail_quote">On Thu, Apr 11, 2013 at 8:37 PM, Brown, Kevin <span dir="ltr"><<a href="mailto:[email protected]" target="_blank">[email protected]</a>></span> wrote:<br><br> +<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><br><br> +Cowfolk,<br><br> +<br><br> +I am doing something like this to create an #http_req suitable for unit<br><br> +testing my resource callbacks:<br></blockquote><br><br></div><div class="gmail_quote">I use the library meck(<a href="https://github.com/eproxus/meck">https://github.com/eproxus/meck</a>) to test stuff doing something like this:<br><br> +<br>some_test() -><br>� meck:expect(cowboy_req, binding, 2, {<<"app_key">>, req} )<br>� ?assertEqual({ok, req, empty},<br>� � ������������ websocket_handler:websocket_init(transport, req, opts)),<br><br> +� ?assert(meck:validate(cowboy_req)).<br><br></div><div class="gmail_quote">I use simple atoms as input and mock the cowboy_req functions to return atoms that would represent the correct or the wrong answer. <br><br></div><br> +<div class="gmail_quote">The real implementation or how cowboy represent stuff is not important here, just the output pattern like {Binding, Req}.<br><br></div><div class="gmail_quote">That's it<br clear="all"></div><br><br> +-- <br><br>Eduardo<br></div></div><br> + +</tt> |