Created
May 3, 2016 21:57
-
-
Save jamiejackson/2d7ca7ace271128ac9e70aa046061b9d to your computer and use it in GitHub Desktop.
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
component | |
extends="testbox.system.BaseSpec" | |
{ | |
/******************** "Global" setup/teardown *****************************/ | |
config(); | |
function config(){ | |
variables.thingsToTest = ["foo","bar","baz"]; | |
} | |
/** | |
* @hint Executes before the *set* of all tests. | |
*/ | |
function beforeAll(){} | |
/** | |
* @hint Executes after the *set* of all tests. | |
*/ | |
function afterAll(){} | |
/*========================================================================*/ | |
function run( testResults, testBox ){ | |
/* | |
* @hint: Executes before each and every test. | |
*/ | |
beforeEach(function( currentSpec ) { | |
// do something | |
}); | |
/* | |
* @hint: Executes after each and every test. | |
*/ | |
afterEach(function( currentSpec ) { | |
// do something | |
}); | |
describe("Example suite", function(){ | |
for ( var thing in thingsToTest ) { | |
it( title=thing & "test", data={thing=thing}, body=function() { | |
var thing = data.thing; | |
writeLog(thing & " start"); | |
expect(writeLog(thing) & thing).toBe(thing); | |
writeLog(thing & " stop"); | |
}); | |
} | |
}); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
body=function( data )