Sha256: b9ca241a8f1ccf49508ac4702136c2593223ff15e955d9633288086a418b1c33

Contents?: true

Size: 1.5 KB

Versions: 6

Compression:

Stored size: 1.5 KB

Contents

require('jsclass')
Faye = require('../build/node/faye-node')
Faye.logger = function() {}

JS.Packages(function() { with(this) {
  autoload(/.*Spec/, {from: 'spec/javascript'})
}})

FakeSocket = function() {
  this._fragments = []
}
FakeSocket.prototype.write = function(buffer, encoding) {
  this._fragments.push([buffer, encoding])
}
FakeSocket.prototype.read = function() {
  var output = []
  this._fragments.forEach(function(buffer, i) {
    for (var j = 0, n = buffer[0].length; j < n; j++)
    output.push(buffer[0][j])
  })
  return output
}
FakeSocket.prototype.addListener = function() {}

JS.require('Faye', 'JS.Test', 'JS.Range', function() {
  JS.Test.Unit.Assertions.include({
    assertYield: function(expected) {
      var testcase = this
      return function(actual) { testcase.assertEqual(expected, actual) }
    }
  })
  
  JS.ENV.Engine = {}
  JS.ENV.Server = {}
  
  JS.require( 'FayeSpec',
              'GrammarSpec',
              'PublisherSpec',
              'ChannelSpec',
              'EngineSpec',
              'Engine.MemorySpec',
              'ServerSpec',
              'Server.HandshakeSpec',
              'Server.ConnectSpec',
              'Server.DisconnectSpec',
              'Server.SubscribeSpec',
              'Server.UnsubscribeSpec',
              'Server.PublishSpec',
              'Server.ExtensionsSpec',
              'Server.IntegrationSpec',
              'NodeAdapterSpec',
              'ClientSpec',
              'TransportSpec',
              JS.Test.method('autorun'))
})

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
faye-0.8.8 spec/node.js
faye-0.8.6 spec/node.js
faye-0.8.5 spec/node.js
faye-0.8.4 spec/node.js
faye-0.8.3 spec/node.js
faye-0.8.2 spec/node.js