diff options
| author | Misko Hevery | 2010-03-26 16:27:18 -0700 | 
|---|---|---|
| committer | Misko Hevery | 2010-03-26 16:27:18 -0700 | 
| commit | 258ca5f16581f0e8befa493644225a02ae2fc002 (patch) | |
| tree | a7d67c586fb5c870619664ca84e17996f6dd2e6d /test/ScopeSpec.js | |
| parent | 1990cbbf2817e04657ccd616da1d9d6b78cc2949 (diff) | |
| download | angular.js-258ca5f16581f0e8befa493644225a02ae2fc002.tar.bz2 | |
moved all uneeded files out, widgets.html works, tests horribly broken
Diffstat (limited to 'test/ScopeSpec.js')
| -rw-r--r-- | test/ScopeSpec.js | 16 | 
1 files changed, 8 insertions, 8 deletions
| diff --git a/test/ScopeSpec.js b/test/ScopeSpec.js index 0a0b4241..cfae42a8 100644 --- a/test/ScopeSpec.js +++ b/test/ScopeSpec.js @@ -1,13 +1,13 @@  describe('scope/model', function(){    it('should create a scope with parent', function(){ -    var model = scope({name:'Misko'}); +    var model = createScope({name:'Misko'});      expect(model.name).toEqual('Misko');    });    it('should have $get/set$/parent$', function(){      var parent = {}; -    var model = scope(parent); +    var model = createScope(parent);      model.$set('name', 'adam');      expect(model.name).toEqual('adam');      expect(model.$get('name')).toEqual('adam'); @@ -16,7 +16,7 @@ describe('scope/model', function(){    //$eval    it('should eval function with correct this and pass arguments', function(){ -    var model = scope(); +    var model = createScope();      model.$eval(function(name){        this.name = name;      }, 'works'); @@ -24,14 +24,14 @@ describe('scope/model', function(){    });    it('should eval expression with correct this', function(){ -    var model = scope(); +    var model = createScope();      model.$eval('name="works"');      expect(model.name).toEqual('works');    });    //$onEval    it('should watch an expression for change', function(){ -    var model = scope(); +    var model = createScope();      model.oldValue = "";      var count = 0;      model.name = 'adam'; @@ -48,7 +48,7 @@ describe('scope/model', function(){    });    it('should eval with no arguments', function(){ -    var model = scope(); +    var model = createScope();      var count = 0;      model.$onEval(function(){count++;});      model.$eval(); @@ -57,7 +57,7 @@ describe('scope/model', function(){    //$bind    it('should curry a function with respect to scope', function(){ -    var model = scope(); +    var model = createScope();      model.name = 'misko';      expect(model.$bind(function(){return this.name;})()).toEqual('misko');    }); @@ -70,7 +70,7 @@ describe('scope/model', function(){      Printer.prototype.print = function(){        this.printed = true;      }; -    var model = scope({ name: 'parent' }, Printer, 'hp'); +    var model = createScope({ name: 'parent' }, Printer, 'hp');      expect(model.brand).toEqual('hp');      model.print();      expect(model.printed).toEqual(true); | 
