Created
March 27, 2010 14:28
-
-
Save emk/346102 to your computer and use it in GitHub Desktop.
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 characters
// 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! | |
} ; |
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 characters
// ========================================================================== | |
// 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