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
(function ($) { | |
$(document.head) | |
.append('<script type="text/javascript" src="http://localhost:1234/twineAPI.js" />') | |
})(jQuery); |
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
{ | |
"name": "server", | |
"version": "0.0.1-4", | |
"private": true, | |
"scripts": { | |
"start": "node app" | |
}, | |
"dependencies": { | |
"express": "~3.3.4", | |
"jade": "~0.34.0", |
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
var testcases = ["dataset_one" | |
,"dataset_two" | |
,"dataset_three"] | |
every(testcases,function(index, testcase){ | |
describe("each Test Case",function(){ | |
it("should be a string",function(){ | |
expect(typeof testcase).toEqual("string"); | |
}) | |
}) |
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
describe('displaying a model',function(){ | |
var testdata = {"title":"The Title" | |
,"description":"Test Data" | |
,"content":"Test Content"} | |
, testmodel = new App.Data.PageModel(testdata) | |
, itemview; | |
beforeEach(function(){ | |
$('<div id=domobject></div>').appendTo('body'); | |
itemview = new App.Views.ItemView({el:$("#domobject") |
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
beforeEach(function(){ | |
// clone the Backbone Application 'App' | |
Data = App.module("Data"); | |
Data.start(); | |
var fakedata = [{"title":"Wine List" | |
,"description":"gallery"}]; | |
Pages = new Data.PageCollection(fakedata); |
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
describe("A Page collection with fake data",function(){ | |
var Data, Pages; | |
Data = App.module("Data"); | |
Data.start(); | |
beforeEach(function(){ | |
var fakedata = [{"title":"Wine List" |
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
App.module("Midi", function(Midi){ | |
Midi.addInitializer(function(options){ | |
// Connect to Java interface here | |
}}; | |
}); | |
// In the Jasmine test code |
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
describe("A Page collection with fake data",function(){ | |
var Data, Pages; | |
beforeEach(function(){ | |
// clone the Backbone Application 'App' | |
var Appclone = jQuery.extend({}, App); | |
// access the module from the cloned app |
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
// Use Gists to store code you would like to remember later on | |
console.log(window); // log the "window" object to the console |
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
var UniversalCollection = require('../universal-collection') | |
, _ = require('lodash') | |
, stateHelper = require('../../models/item/state-helpers.js') | |
, getStateObject = require('../../models/item/getStateObject.js') | |
, ItemSupplierStateCollection | |
, checkStateHelper = function(where, doc){ | |
return stateHelper[where](getStateObject(doc)) | |
} | |
/** |
NewerOlder