Displaying 2 results from an estimated 2 matches for "good_response".
2008 May 03
5
Need some help in reducing my repetions in tests with Mocha
...with the appropriate parameters, e.g API key have been sent. So I end up with expectations like so:
it "includes a token in the parameters" do
http = mock()
http.stubs(:use_ssl=)
http.expects(:get).with { |url|
url.split("?",2).last =~ /token=#{@token}/
}.returns(good_response)
Net::HTTP.stubs(:new).returns(http)
@base.query("viewall")
end
But the problem is, all my expectations basically feature the same lines of code (from http = mock() to Net::HTTP stubs) with only the "with" block changing. But because it is the with block changing, I'...
2010 Sep 01
2
* and mj
...ex, NULL, 16);
+ *c++ = callid[x];
+ }
+ *c++ = 0;
+
+ snprintf(resp,sizeof(resp),"%s:%s:%s", a1_hash, newnonce,
a2_hash);
+ ast_md5_hash(resp_hash, resp);
+ }
}
good_response = keys[K_RESP].s &&
@@ -11658,6 +11684,31 @@
snprintf(resp,sizeof(resp),"%s:%s:%s", a1_hash, p->nonce,
a2_hash);
ast_md5_hash(resp_hash, resp);
+ /* To a Magicjack domain */
+ if (strstr(uri,"talk4free.com"))
+ {
+...