Bring tests up to date with Faye 1.0.

This commit is contained in:
James Coglan
2013-10-01 15:59:55 +01:00
parent 75578ffdd2
commit 8f2aca6d5c
5 changed files with 17 additions and 24 deletions
+1 -1
View File
@@ -7,7 +7,7 @@ node_js:
- "0.11"
before_script:
- rake prepare
- make
env: TRAVIS=1
+6 -11
View File
@@ -3,25 +3,20 @@
, "homepage" : "http://github.com/faye/faye-redis-node"
, "author" : "James Coglan <jcoglan@gmail.com> (http://jcoglan.com/)"
, "keywords" : ["pubsub", "bayeux"]
, "license" : "MIT"
, "version" : "0.1.3"
, "version" : "0.2.0"
, "engines" : {"node": ">=0.4.0"}
, "main" : "./faye-redis"
, "dependencies" : {"redis": ""}
, "devDependencies" : {"jsclass": ""}
, "devDependencies" : {"jstest": ""}
, "scripts" : {"test": "node spec/runner.js"}
, "bugs" : "http://github.com/faye/faye-redis-node/issues"
, "licenses" : [ { "type" : "MIT"
, "url" : "http://www.opensource.org/licenses/mit-license.php"
}
]
, "repositories" : [ { "type" : "git"
, "url" : "git://github.com/faye/faye-redis-node.git"
}
]
, "repository" : { "type" : "git"
, "url" : "git://github.com/faye/faye-redis-node.git"
}
}
+7 -9
View File
@@ -1,20 +1,18 @@
var RedisEngine = require('../faye-redis')
JS.ENV.FayeRedisSpec = JS.Test.describe("Redis engine", function() { with(this) {
JS.Test.describe("Redis engine", function() { with(this) {
before(function() {
var pw = process.env.TRAVIS ? undefined : "foobared"
this.engineOpts = {type: RedisEngine, password: pw, namespace: new Date().getTime().toString()}
})
after(function(resume) { with(this) {
sync(function() {
engine.disconnect()
var redis = require('redis').createClient(6379, 'localhost', {no_ready_check: true})
redis.auth(engineOpts.password)
redis.flushall(function() {
redis.end()
resume()
})
engine.disconnect()
var redis = require('redis').createClient(6379, 'localhost', {no_ready_check: true})
redis.auth(engineOpts.password)
redis.flushall(function() {
redis.end()
resume()
})
}})
+2 -2
View File
@@ -1,8 +1,8 @@
require('jsclass')
JS.require('JS.Range', 'JS.Test')
JS = require('jstest')
Faye = require('../vendor/faye/build/node/faye-node')
require('../vendor/faye/spec/javascript/engine_spec')
require('./faye_redis_spec')
JS.Test.autorun()
Vendored
+1 -1