Last active
October 12, 2024 17:11
-
Star
(180)
You must be signed in to star a gist -
Fork
(30)
You must be signed in to fork a gist
-
-
Save michaelcox/3800736 to your computer and use it in GitHub Desktop.
Revisions
-
michaelcox revised this gist
Aug 23, 2014 . 1 changed file with 0 additions and 10 deletions.There are no files selected for viewing
This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -10,16 +10,6 @@ require.config({ 'models' : '/app/models' }, shim: { 'chai-jquery': ['jquery', 'chai'] }, urlArgs: 'bust=' + (new Date()).getTime() -
michaelcox revised this gist
Aug 23, 2014 . 1 changed file with 5 additions and 2 deletions.There are no files selected for viewing
This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -25,13 +25,16 @@ require.config({ urlArgs: 'bust=' + (new Date()).getTime() }); define(function(require) { var chai = require('chai'); var mocha = require('mocha'); require('jquery'); require('chai-jquery'); // Chai var should = chai.should(); chai.use(chaiJquery); mocha.setup('bdd'); require([ -
michaelcox revised this gist
Aug 23, 2014 . 1 changed file with 2 additions and 2 deletions.There are no files selected for viewing
This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -25,7 +25,7 @@ require.config({ urlArgs: 'bust=' + (new Date()).getTime() }); require(['chai', 'chai-jquery', 'mocha', 'jquery'], function(chai, chaiJquery){ // Chai var should = chai.should(); @@ -35,7 +35,7 @@ require(['require', 'chai', 'chai-jquery', 'mocha', 'jquery'], function(require, mocha.setup('bdd'); require([ 'specs/model-tests.js', ], function(require) { mocha.run(); }); -
michaelcox revised this gist
Sep 28, 2012 . No changes.There are no files selected for viewing
-
michaelcox created this gist
Sep 28, 2012 .There are no files selected for viewing
This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,43 @@ require.config({ baseUrl: '/backbone-tests/', paths: { 'jquery' : '/app/libs/jquery', 'underscore' : '/app/libs/underscore', 'backbone' : '/app/libs/backbone', 'mocha' : 'libs/mocha', 'chai' : 'libs/chai', 'chai-jquery' : 'libs/chai-jquery', 'models' : '/app/models' }, shim: { 'underscore': { exports: '_' }, 'jquery': { exports: '$' }, 'backbone': { deps: ['underscore', 'jquery'], exports: 'Backbone' }, 'chai-jquery': ['jquery', 'chai'] }, urlArgs: 'bust=' + (new Date()).getTime() }); require(['require', 'chai', 'chai-jquery', 'mocha', 'jquery'], function(require, chai, chaiJquery){ // Chai var should = chai.should(); chai.use(chaiJquery); /*globals mocha */ mocha.setup('bdd'); require([ 'specs/model-test.js', ], function(require) { mocha.run(); }); }); This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,11 @@ <html> <head> <meta charset="utf-8"/> <title>Backbone Tests</title> <link rel="stylesheet" href="libs/mocha.css"/> </head> <body> <div id="mocha"></div> <script data-main="SpecRunner.js" src="/app/libs/require.js"></script> </body> </html> This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,15 @@ define(function(require) { var models = require('models'); describe('Models', function() { describe('Sample Model', function() { it('should default "urlRoot" property to "/api/samples"', function() { var sample = new models.Sample(); sample.urlRoot.should.equal('/api/samples'); }); }); }); }); This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,12 @@ define(function(require) { var Backbone = require('backbone'); var models = {}; models.Sample = Backbone.Model.extend({ urlRoot: '/api/samples' }); return models; });