lib/jspec.js in visionmedia-jspec-2.4.0 vs lib/jspec.js in visionmedia-jspec-2.4.1
- old
+ new
@@ -3,11 +3,11 @@
(function(){
JSpec = {
- version : '2.4.0',
+ version : '2.4.1',
suites : [],
modules : [],
allSuites : [],
matchers : {},
stubbed : [],
@@ -1236,13 +1236,13 @@
this.currentSuite = suite
this.evalBody(suite.body)
suite.ran = true
suite.hook('before'), hook('beforeSuite', suite)
each(suite.specs, function(spec) {
- suite.hook('before_each'), hook('beforeSpec', spec)
+ suite.hook('before_each')
JSpec.runSpec(spec)
- suite.hook('after_each'), hook('afterSpec', spec)
+ suite.hook('after_each'),
})
if (suite.hasSuites()) {
each(suite.suites, function(suite) {
JSpec.runSuite(suite)
})
@@ -1271,12 +1271,14 @@
*/
runSpec : function(spec) {
this.currentSpec = spec
if (option('profile')) console.time(spec.description)
+ hook('beforeSpec', spec)
try { this.evalBody(spec.body) }
catch (e) { fail(e) }
spec.runDeferredAssertions()
+ hook('afterSpec', spec)
if (option('profile')) console.timeEnd(spec.description)
destub()
this.stats.specsFinished++
this.stats.assertions += spec.assertions.length
},
\ No newline at end of file