Created
September 6, 2012 04:13
-
-
Save brian428/3651132 to your computer and use it in GitHub Desktop.
Setup for a more complex spec
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
describe "The Main Tab Panel...", -> | |
view = null | |
viewController = null | |
# A hidden div where we can add UI components to test them and their dependencies. | |
createComponentTestArea = -> | |
if Ext.get( "componentTestArea" )? then Ext.removeNode( Ext.get( "componentTestArea" ).dom ) | |
Ext.DomHelper.append( Ext.getBody(), "<div id='componentTestArea' style='visibility: hidden'></div>" ) | |
beforeEach( -> | |
createComponentTestArea() | |
# For each test, create a MainTabPanel instance and render it. | |
view = Ext.create( "JasmineExample.view.MainTabPanel", | |
renderTo: "componentTestArea" | |
) | |
# Grab a reference to the ViewController for the MainTabPanel. | |
viewController = view.getController() | |
) | |
afterEach( -> | |
# After each test, destroy the view and clean up. | |
view.destroy() | |
view = null | |
viewController = null | |
) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment