Remove deprecated syntax from robot spec

This commit is contained in:
Andrew Stewart 2014-11-26 09:42:09 -08:00
parent ca8e22f1e2
commit 83153664f5
1 changed files with 24 additions and 7 deletions

View File

@ -73,7 +73,9 @@ describe("Robot", function() {
var fn = function() { var fn = function() {
return new Robot({ return new Robot({
name: 'BrokenBot', name: 'BrokenBot',
device: { name: 'ping', driver: 'ping' } devices: {
ping: { driver: 'ping' }
}
}); });
}; };
@ -198,8 +200,13 @@ describe("Robot", function() {
describe("#toJSON", function() { describe("#toJSON", function() {
var bot = new Robot({ var bot = new Robot({
connection: { name: 'loopback', adaptor: 'loopback' }, connections: {
device: { name: 'ping', driver: 'ping' } loopback: { adaptor: 'loopback' }
},
devices: {
ping: { driver: 'ping' }
}
}); });
var json = bot.toJSON(); var json = bot.toJSON();
@ -327,7 +334,9 @@ describe("Robot", function() {
beforeEach(function() { beforeEach(function() {
bot = new Robot({ bot = new Robot({
connection: { name: 'loopback', adaptor: 'loopback' } connections: {
loopback: { adaptor: 'loopback' }
}
}); });
}); });
@ -432,7 +441,10 @@ describe("Robot", function() {
beforeEach(function() { beforeEach(function() {
bot = new Robot({ bot = new Robot({
connection: { name: 'loopback', adaptor: 'loopback' }, connections: {
loopback: { adaptor: 'loopback' }
},
devices: { devices: {
alpha: { driver: 'ping' }, alpha: { driver: 'ping' },
bravo: { driver: 'ping' } bravo: { driver: 'ping' }
@ -456,8 +468,13 @@ describe("Robot", function() {
beforeEach(function() { beforeEach(function() {
bot = new Robot({ bot = new Robot({
device: { name: 'ping', driver: 'ping' }, devices: {
connection: { name: 'loopback', adaptor: 'loopback' } ping: { driver: 'ping' }
},
connections: {
loopback: { adaptor: 'loopback' }
}
}); });
device = bot.devices.ping; device = bot.devices.ping;