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
Montric.ChartView = Ember.View.extend({ | |
classNames: ['eurekajChart'], | |
resizeHandler: null, | |
nvd3Chart: null, | |
contentObserver: function() { | |
console.log('ChartView contentObserver!'); | |
var elementId = this.get('elementId'); | |
var series = this.get('chart.series'); | |
console.log('series: ' + series); |
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
auto eth0 | |
iface eth0 inet static | |
address 192.168.1.202 | |
netmask 255.255.255.0 | |
gateway 192.168.1.1 | |
#auto br0 | |
#iface br0 inet static | |
# address 192.168.1.202 | |
# netmask 255.255.255.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
contentArrayContains: function(id, type) { | |
var contains = null; | |
Ember.get(type, 'collection').forEach(function(item) { | |
if (item.get('id') === id) { | |
contains = item; | |
} | |
}); | |
return contains; |
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 alertAdminController; | |
module("EurekaJ.AdministrationAlertsController", { | |
setup: function() { | |
this.server = sinon.fakeServer.create(); | |
Ember.run(function() { | |
alertAdminController = EurekaJ.__container__.lookup("controller:administrationAlerts"); | |
}); |
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 alertAdminController; | |
module("EurekaJ.AdministrationAlertsController", { | |
setup: function() { | |
this.server = sinon.fakeServer.create(); | |
Ember.run(function() { | |
alertAdminController = EurekaJ.__container__.lookup("controller:administrationAlerts"); | |
}); |
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 appController; | |
var inputDate = new Date(2013,2,27,11,15,00); | |
module("EurekaJ.AppController", { | |
setup: function() { | |
Ember.run(function() { | |
appController = EurekaJ.__container__.lookup("controller:application"); | |
}); | |
}, |
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 interval = null; | |
var args = phantom.args; | |
if (args.length < 1 || args.length > 2) { | |
console.log("Usage: " + phantom.scriptName + " <URL> <timeout>"); | |
phantom.exit(1); | |
} | |
var page = require('webpage').create(); | |
page.onConsoleMessage = function(msg) { | |
if (msg.slice(0, 8) === 'WARNING:') { |
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
Even though JavaScript have matured significantly over the last five years, there is still a couple of areas where you will most definitely notice that you are working with a project that still have some maturing to do. Testing is definitely one of these areas, leaving a lot of the decisions required up to the application developers. This chapter will attempt to outline how you can successfully test your own Ember.js applications while looking at a real world implementation of one possible test harness. | |
As with applications written in other languages, there are multiple way to test your application, including: | |
• Unit Testing | |
• Integration Testing | |
• Performance Testing | |
• Regression Testing | |
• Black Box Testing | |
• Continuous Integration | |
Naturally, you might not need to implement a solution for all of these testing types in your own application. Chances are, though, that you might need several of them, where unit testing and integration testing are the most common types of test harnesses you will find f |
This file has been truncated, but you can view the full file.
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
/* | |
* Date Format 1.2.3 | |
* (c) 2007-2009 Steven Levithan <stevenlevithan.com> | |
* MIT license | |
* | |
* Includes enhancements by Scott Trenda <scott.trenda.net> | |
* and Kris Kowal <cixar.com/~kris.kowal/> | |
* | |
* Accepts a date, a mask, or a date and a mask. | |
* Returns a formatted version of the given date. |
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 appController; | |
module("EurekaJ.AppController", { | |
setup: function() { | |
appController = EurekaJ.ApplicationController.create(); | |
}, | |
teardown: function() { | |
} | |
}); |