Fixed api_test compile errors

This commit is contained in:
Jeremy Saenz 2014-04-26 09:21:48 -07:00 committed by Adrian Zankich
parent d4f6d06003
commit 5e8f7451f7
1 changed files with 9 additions and 8 deletions

View File

@ -13,23 +13,24 @@ import (
var _ = Describe("Master", func() { var _ = Describe("Master", func() {
var ( var (
myMaster *Master m *Master
a *api a *api
) )
BeforeEach(func() { BeforeEach(func() {
myMaster = GobotMaster() m = NewMaster()
startApi = func(m *api) {} a = Api(m)
a = Api(myMaster) a.startFunc = func(m *api) {}
myMaster.Robots = []*Robot{
m.Robots = []*Robot{
newTestRobot("Robot 1"), newTestRobot("Robot 1"),
newTestRobot("Robot 2"), newTestRobot("Robot 2"),
newTestRobot("Robot 3"), newTestRobot("Robot 3"),
} }
trap = func(c chan os.Signal) { m.trap = func(c chan os.Signal) {
c <- os.Interrupt c <- os.Interrupt
} }
myMaster.Start() m.Start()
}) })
Context("when valid", func() { Context("when valid", func() {