Skip to content

Instantly share code, notes, and snippets.

@emk
Created March 27, 2010 14:28
Show Gist options
  • Save emk/346102 to your computer and use it in GitHub Desktop.
Save emk/346102 to your computer and use it in GitHub Desktop.
// The standard 'main' function.
MyApp.main = function main() {
// Step 1: Instantiate Your Views
// The default code here will make the mainPane for your application visible
// on screen. If you app gets any level of complexity, you will probably
// create multiple pages and panes.
MyApp.getPath('mainPage.mainPane').append() ;
// Step 2. Set the content property on your primary controller.
// This will make your app come alive!
} ;
// ==========================================================================
// Project: MyApp.MyView Unit Test
// Copyright: ©2010 My Company, Inc.
// ==========================================================================
/*globals MyApp module test ok equals same stop start */
(function () {
// Just this by itself seems to be enough to load the full application GUI.
var pane = SC.ControlTestPane.design()
.add('basic', MyApp.MyView.design({
});
pane.show();
module("MyApp.MyView", pane.standardSetup());
test("test description", function() {
var expected = "test";
var result = "test";
equals(result, expected, "test should equal test");
});
})();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment