2014-04-27 09:07:04 +08:00
|
|
|
package sphero
|
2014-04-26 18:11:51 +08:00
|
|
|
|
|
|
|
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
|
2014-04-26 18:11:51 +08:00
|
|
|
)
|
|
|
|
|
|
|
|
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")
|
2014-04-26 18:11:51 +08:00
|
|
|
})
|
|
|
|
|
|
|
|
It("Must be able to Start", func() {
|
2014-04-27 09:07:04 +08:00
|
|
|
Expect(s.Start()).To(Equal(true))
|
2014-04-26 18:11:51 +08:00
|
|
|
})
|
|
|
|
It("Must be able to Init", func() {
|
2014-04-27 09:07:04 +08:00
|
|
|
Expect(s.Init()).To(Equal(true))
|
2014-04-26 18:11:51 +08:00
|
|
|
})
|
|
|
|
It("Must be able to Halt", func() {
|
2014-04-27 09:07:04 +08:00
|
|
|
Expect(s.Halt()).To(Equal(true))
|
2014-04-26 18:11:51 +08:00
|
|
|
})
|
|
|
|
})
|