-
-
Notifications
You must be signed in to change notification settings - Fork 4.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #4159 from rjackson/add_ember_setupForTesting
Add Ember.setupForTesting.
- Loading branch information
Showing
3 changed files
with
20 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
/** | ||
Sets Ember up for testing. This is useful to perform | ||
basic setup steps in order to unit test. | ||
Use `App.setupForTesting` to perform integration tests (full | ||
application testing). | ||
@method setupForTesting | ||
@namespace Ember | ||
*/ | ||
Ember.setupForTesting = function() { | ||
Ember.testing = true; | ||
|
||
// if adapter is not manually set default to QUnit | ||
if (!Ember.Test.adapter) { | ||
Ember.Test.adapter = Ember.Test.QUnitAdapter.create(); | ||
} | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters