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 (
myMaster *Master
a *api
m *Master
a *api
)
BeforeEach(func() {
myMaster = GobotMaster()
startApi = func(m *api) {}
a = Api(myMaster)
myMaster.Robots = []*Robot{
m = NewMaster()
a = Api(m)
a.startFunc = func(m *api) {}
m.Robots = []*Robot{
newTestRobot("Robot 1"),
newTestRobot("Robot 2"),
newTestRobot("Robot 3"),
}
trap = func(c chan os.Signal) {
m.trap = func(c chan os.Signal) {
c <- os.Interrupt
}
myMaster.Start()
m.Start()
})
Context("when valid", func() {