hybridgroup.gobot/platforms/sphero/sphero_driver_test.go

30 lines
522 B
Go
Raw Normal View History

2014-04-27 09:07:04 +08:00
package sphero
import (
. "github.com/onsi/ginkgo"
. "github.com/onsi/gomega"
)
var _ = Describe("SpheroDriver", func() {
var (
2014-04-29 02:40:20 +08:00
s *SpheroDriver
2014-04-27 09:07:04 +08:00
a *SpheroAdaptor
)
BeforeEach(func() {
2014-05-23 12:20:16 +08:00
a = NewSpheroAdaptor("bot", "/dev/null")
2014-04-27 09:07:04 +08:00
a.sp = sp{}
2014-05-23 12:20:16 +08:00
s = NewSpheroDriver(a, "bot")
})
It("Must be able to Start", func() {
2014-04-27 09:07:04 +08:00
Expect(s.Start()).To(Equal(true))
})
It("Must be able to Init", func() {
2014-04-27 09:07:04 +08:00
Expect(s.Init()).To(Equal(true))
})
It("Must be able to Halt", func() {
2014-04-27 09:07:04 +08:00
Expect(s.Halt()).To(Equal(true))
})
})