spec.plugins.js
This file
Path
spec/spec.plugins.js
39 lines · 864 bytes · JavaScript
Last changed by
Calling Plugin.init() when availablevisionmediabefore adoption78d538a
History of this fileTake it
The walk stopped after 200 commits: lines older than 7d36c6a point at it.
Added haml to list of supported template enginesvisionmediabefore adoption7d36c6a
lines 1–2why, one step back12CSSColors = Plugin.extend({Calling Plugin.init() when availablevisionmediabefore adoption78d538a
lines 3–7why, one step back3 extend: {4 init: function() {5 this.initialized = true6 }7 },Added haml to list of supported template enginesvisionmediabefore adoption7d36c6a
lines 8–20why, one step back8 on: {9 response: function(event) {10 if (event.response.headers['content-type'] == mime('css'))11 event.response.body = event.response.body.replace('black', '#000')12 }13 }14})1516describe 'Express'17 describe 'use()'18 before_each19 reset()20 use(CSSColors)Calling Plugin.init() when availablevisionmediabefore adoption78d538a
lines 21–24why, one step back21 end22 23 it 'should call .init on plugins when available'24 CSSColors.initialized.should.be_trueAdded haml to list of supported template enginesvisionmediabefore adoption7d36c6a
lines 25–30why, one step back25 end26 27 describe 'events'28 describe 'response'29 it 'should be triggered before headers and body are sent'30 get('/style.css', function(){Fixing more specsvisionmediabefore adoption3a90a78
line 31why, one step back31 this.contentType('css')Added haml to list of supported template enginesvisionmediabefore adoption7d36c6a
lines 32–39why, one step back32 return 'body { color: black; }'33 })34 get('/style.css').body.should.eql 'body { color: #000; }'35 end36 end37 end38 end39end