silverstripe-framework/thirdparty/jquery-concrete/vendor/jspec/spec/modules.js
Ingo Schommer dca8c0cb6f merging
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@92557 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-11-21 02:33:06 +00:00

42 lines
995 B
JavaScript

ExampleModule = {
name : 'ExampleModule',
utilities : {
doFoo : function(){ return 'foo' },
doBar : function(){ return 'bar' }
},
randomHook : function(a, b) {
return [a, b]
},
beforeSpec : function() { addedBeforeSpec = true; doFoo() },
afterSpec : function() { addedAfterSpec = true },
beforeSuite : function() { addedBeforeSuite = true },
afterSuite : function() { addedAfterSuite = true },
checkJSpecContext : function(){ return each },
checkContext : function() { return fixture('test') },
checkModuleContext : function() { return this.name },
checkUtilityContext : function() { return doFoo() },
matchers : {
be_foo_bar : function() {
return true
}
},
DSLs : {
snake : {
some_snake_case_stuff : function(){
return true
}
},
camel : {
someCamelCaseStuff : function() {
return true
}
}
}
}
JSpec.include(ExampleModule)
JSpec.include({
name : 'EmptyModule'
})