mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 14:05:37 +02:00
dca8c0cb6f
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@92557 467b73ca-7a2a-4603-9d3b-597d59a354a9
42 lines
995 B
JavaScript
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'
|
|
}) |