diff options
| author | Shawn Flahave | 2014-01-27 22:36:27 -0600 | 
|---|---|---|
| committer | Jeff Cross | 2014-01-30 16:52:06 -0800 | 
| commit | 29432ffe3795477d8f6174cee1976683ded89d67 (patch) | |
| tree | 8cafeecdb6754549e41262a03141deaa33563db2 /src/ngMock/angular-mocks.js | |
| parent | caed2dfe4feeac5d19ecea2dbb1456b7fde21e6d (diff) | |
| download | angular.js-29432ffe3795477d8f6174cee1976683ded89d67.tar.bz2 | |
Edited the 'Flushing HTTP requests' section
Minor grammatical edits in the Flushing HTTP requests section.
Diffstat (limited to 'src/ngMock/angular-mocks.js')
| -rw-r--r-- | src/ngMock/angular-mocks.js | 14 | 
1 files changed, 7 insertions, 7 deletions
| diff --git a/src/ngMock/angular-mocks.js b/src/ngMock/angular-mocks.js index b09d26cd..19f0ac9d 100644 --- a/src/ngMock/angular-mocks.js +++ b/src/ngMock/angular-mocks.js @@ -989,18 +989,18 @@ angular.mock.dump = function(object) {   *   * # 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, follow and maintain. At the same time the testing mock, can't respond + * 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 preserving the async api of the backend, while allowing the test to execute + * requests and thus preserve 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 in unit testing a controller. - * First we create the controller under test + * The following code shows how to setup and use the mock backend when unit testing a controller. + * First we create the controller under test:   *    <pre>    // The controller code @@ -1025,7 +1025,7 @@ angular.mock.dump = function(object) {    }    </pre>   * - * Now we setup the mock backend and create the test specs. + * Now we setup the mock backend and create the test specs:   *    <pre>      // testing controller | 
