spec.core.js
This file
Path
spec/spec.core.js
93 lines · 2.1 KiB · JavaScript
Last changed by
Added "throw exceptions" optionsvisionmediabefore adoptionb505c96
History of this fileTake it
The walk stopped after 200 commits: lines older than 5342d04 point at it.
Docsvisionmediabefore adoption5342d04
lines 1–10why, one step back12describe 'Express'3 describe '.version'4 it 'should be properly formatted'5 Express.version.should.match(/^\d+\.\d+\.\d+$/)6 end7 end8 9 describe 'set()'10 it 'should set an option'Added "throw exceptions" optionsvisionmediabefore adoptionb505c96
lines 11–13why, one step back11 set('throw exceptions').should.be_null12 set('throw exceptions', true)13 set('throw exceptions').should.be_trueDocsvisionmediabefore adoption5342d04
line 14why, one step back14 endAdded spec for defered settings using function literalvisionmediabefore adoption70667cf
lines 15–17why, one step back15 16 it 'should defer using a function'17 set('root', 'spec')set() now allows functionsvisionmediabefore adoption611911e
line 18why, one step back18 set('views', function(){ return set('root') + '/views' })Added spec for defered settings using function literalvisionmediabefore adoption70667cf
lines 19–20why, one step back19 set('views').should.eql 'spec/views'20 endDocsvisionmediabefore adoption5342d04
lines 21–35why, one step back21 end22 23 describe 'enable()'24 it 'should enable an option'25 enable('sessions')26 set('sessions').should.be_true27 end28 end29 30 describe 'disable()'31 it 'should disable an option'32 disable('sessions')33 set('sessions').should.be_false34 end35 endAdded specs for configure()visionmediabefore adoption3901c33
lines 36–37why, one step back36 37 describe 'configure()'Added configure()visionmediabefore adoptiond33e68c
line 38why, one step back38 describe 'given several calls'Added specs for configure()visionmediabefore adoption3901c33
lines 39–41why, one step back39 it 'should call them in sequence'40 var order = []41 configure(function(){Added configure()visionmediabefore adoptiond33e68c
line 42why, one step back42 order.push('a')Added specs for configure()visionmediabefore adoption3901c33
lines 43–44why, one step back43 })44 configure(function(){Added configure()visionmediabefore adoptiond33e68c
line 45why, one step back45 order.push('b')Added specs for configure()visionmediabefore adoption3901c33
lines 46–83why, one step back46 })47 configure('development')48 order.should.eql ['a', 'b']49 end50 51 it 'should call the specific environment only'52 var order = []53 configure('test', function(){54 order.push('a')55 })56 configure('development', function(){57 order.push('b')58 })59 configure('test', function(){60 order.push('c')61 })62 configure('test')63 order.should.eql ['a', 'c']64 end65 66 it 'should call global configurations as well'67 var order = []68 configure(function(){69 order.push('a')70 })71 configure('development', function(){72 order.push('b')73 })74 configure('test', function(){75 order.push('c')76 })77 configure(function(){78 order.push('d')79 })80 configure('test')81 order.should.eql ['a', 'c', 'd']82 end83 endAdded configure()visionmediabefore adoptiond33e68c
lines 84–90why, one step back84 85 describe 'given no arguments'86 it 'should throw an error'87 // TODO: tighter spec once JSpec is fixed88 -{ configure() }.should.throw_error89 end90 endAdded specs for configure()visionmediabefore adoption3901c33
line 91why, one step back91 endAdded configure()visionmediabefore adoptiond33e68c
line 92why, one step back92 Docsvisionmediabefore adoption5342d04
line 93why, one step back93end