mirror of
https://github.com/Hopiu/angular.js.git
synced 2026-05-11 08:13:10 +00:00
fixed Scenario.js so that it does not clobber global vars
This commit is contained in:
parent
406373b5db
commit
a0ac6725ed
1 changed files with 2 additions and 2 deletions
|
|
@ -22,7 +22,7 @@ angular.scenario.ui = angular.scenario.ui || {};
|
||||||
* @param {Function} Factory function(application), return a function for
|
* @param {Function} Factory function(application), return a function for
|
||||||
* the statement.
|
* the statement.
|
||||||
*/
|
*/
|
||||||
angular.scenario.dsl = function(name, fn) {
|
angular.scenario.dsl = angular.scenario.dsl || function(name, fn) {
|
||||||
angular.scenario.dsl[name] = function() {
|
angular.scenario.dsl[name] = function() {
|
||||||
function executeStatement(statement, args) {
|
function executeStatement(statement, args) {
|
||||||
var result = statement.apply(this, args);
|
var result = statement.apply(this, args);
|
||||||
|
|
@ -57,7 +57,7 @@ angular.scenario.dsl = function(name, fn) {
|
||||||
* @param {String} The name of the matcher
|
* @param {String} The name of the matcher
|
||||||
* @param {Function} The matching function(expected).
|
* @param {Function} The matching function(expected).
|
||||||
*/
|
*/
|
||||||
angular.scenario.matcher = function(name, fn) {
|
angular.scenario.matcher = angular.scenario.matcher || function(name, fn) {
|
||||||
angular.scenario.matcher[name] = function(expected) {
|
angular.scenario.matcher[name] = function(expected) {
|
||||||
var prefix = 'expect ' + this.future.name + ' ';
|
var prefix = 'expect ' + this.future.name + ' ';
|
||||||
if (this.inverse) {
|
if (this.inverse) {
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue