Skip to content
Myr

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 file

Take it

The walk stopped after 200 commits: lines older than f09358b point at it.

Fixed wiki urivisionmediabefore adoptionf09358b

lines 1–2why, one step back
1
2CSSColors = Plugin.extend({

Calling Plugin.init() when availablevisionmediabefore adoption78d538a

lines 3–7why, one step back
3 extend: {
4 init: function() {5 this.initialized = true6 }7 },

Fixed wiki urivisionmediabefore adoptionf09358b

lines 8–20why, one step back
8 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 back
21 end
22 23 it 'should call .init on plugins when available'24 CSSColors.initialized.should.be_true

Fixed wiki urivisionmediabefore adoptionf09358b

lines 25–30why, one step back
25 end
26 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 back
31 this.contentType('css')

Fixed wiki urivisionmediabefore adoptionf09358b

lines 32–39why, one step back
32 return 'body { color: black; }'
33 })34 get('/style.css').body.should.eql 'body { color: #000; }'35 end36 end37 end38 end39end