vendor/assets/javascripts/angular-mocks.js in angular-gem-1.2.14 vs vendor/assets/javascripts/angular-mocks.js in angular-gem-1.2.15
- old
+ new
@@ -1,7 +1,7 @@
/**
- * @license AngularJS v1.2.14
+ * @license AngularJS v1.2.15
* (c) 2010-2014 Google, Inc. http://angularjs.org
* License: MIT
*/
(function(window, angular, undefined) {
@@ -503,11 +503,11 @@
* @name $interval#cancel
*
* @description
* Cancels a task associated with the `promise`.
*
- * @param {number} promise A promise from calling the `$interval` function.
+ * @param {promise} promise A promise from calling the `$interval` function.
* @returns {boolean} Returns `true` if the task was successfully cancelled.
*/
$interval.cancel = function(promise) {
if(!promise) return false;
var fnIndex;
@@ -965,17 +965,16 @@
* the request. The response from the first matched definition is returned.
*
*
* # Flushing HTTP requests
*
- * The $httpBackend used in production always responds to requests with responses asynchronously.
- * If we preserved this behavior in unit testing we'd have to create async unit tests, which are
- * hard to write, understand, and maintain. However, the testing mock can't respond
- * synchronously because that would change the execution of the code under test. For this reason the
- * mock $httpBackend has a `flush()` method, which allows the test to explicitly flush pending
- * requests and thus preserve the async api of the backend while allowing the test to execute
- * synchronously.
+ * The $httpBackend used in production always responds to requests asynchronously. If we preserved
+ * this behavior in unit testing, we'd have to create async unit tests, which are hard to write,
+ * to follow and to maintain. But neither can the testing mock respond synchronously; that would
+ * change the execution of the code under test. For this reason, the mock $httpBackend has a
+ * `flush()` method, which allows the test to explicitly flush pending requests. This preserves
+ * the async api of the backend, while allowing the test to execute synchronously.
*
*
* # Unit testing with mock $httpBackend
* The following code shows how to setup and use the mock backend when unit testing a controller.
* First we create the controller under test:
@@ -1827,11 +1826,11 @@
* `{function([status,] data[, headers])|function(function(method, url, data, headers)}`
* – The respond method takes a set of static data to be returned or a function that can return
* an array containing response status (number), response data (string) and response headers
* (Object).
* - passThrough – `{function()}` – Any request matching a backend definition with `passThrough`
- * handler, will be pass through to the real backend (an XHR request will be made to the
- * server.
+ * handler will be passed through to the real backend (an XHR request will be made to the
+ * server.)
*/
/**
* @ngdoc method
* @name $httpBackend#whenGET