Sha256: 856e158f297ff7d3db98505221d9d81f879b1380e2980dc46743ef22b73f54da

Contents?: true

Size: 1.49 KB

Versions: 4

Compression:

Stored size: 1.49 KB

Contents

require('jsclass')
Faye = require('../build/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

4 entries across 4 versions & 3 rubygems

Version Path
_bushido-faye-0.8.2 spec/node.js
_bushido-faye-0.8.1 spec/node.js
bushido-faye-0.8.1 spec/node.js
faye-0.8.1 spec/node.js