1
0
mirror of https://github.com/hybridgroup/gobot.git synced 2025-05-14 19:29:32 +08:00
hybridgroup.gobot/platforms/sphero/sphero_driver_test.go

30 lines
522 B
Go
Raw Normal View History

2014-04-26 18:07:04 -07:00
package sphero
import (
. "github.com/onsi/ginkgo"
. "github.com/onsi/gomega"
)
var _ = Describe("SpheroDriver", func() {
var (
2014-04-28 11:40:20 -07:00
s *SpheroDriver
2014-04-26 18:07:04 -07:00
a *SpheroAdaptor
)
BeforeEach(func() {
2014-05-22 21:20:16 -07:00
a = NewSpheroAdaptor("bot", "/dev/null")
2014-04-26 18:07:04 -07:00
a.sp = sp{}
2014-05-22 21:20:16 -07:00
s = NewSpheroDriver(a, "bot")
})
It("Must be able to Start", func() {
2014-04-26 18:07:04 -07:00
Expect(s.Start()).To(Equal(true))
})
It("Must be able to Init", func() {
2014-04-26 18:07:04 -07:00
Expect(s.Init()).To(Equal(true))
})
It("Must be able to Halt", func() {
2014-04-26 18:07:04 -07:00
Expect(s.Halt()).To(Equal(true))
})
})