make plugin specs finally work

This commit is contained in:
John McLear 2013-02-04 00:03:25 +00:00
parent da0b331502
commit de07d5a3e1
1 changed files with 6 additions and 2 deletions

View File

@ -179,7 +179,11 @@ $(function(){
//inject spec scripts into the dom
var $body = $('body');
$.each(specs, function(i, spec){
$body.append('<script src="specs/' + spec + '"></script>')
if(spec[0] != "/"){ // if the spec isn't a plugin spec which means the spec file might be in a different subfolder
$body.append('<script src="specs/' + spec + '"></script>')
}else{
$body.append('<script src="' + spec + '"></script>')
}
});
//initalize the test helper
@ -196,4 +200,4 @@ $(function(){
mocha.run();
});
});
});