1
0
mirror of https://github.com/hybridgroup/gobot.git synced 2025-05-13 19:29:10 +08:00
hybridgroup.gobot/platforms/sphero/sphero_adaptor_test.go
2014-05-22 21:20:16 -07:00

32 lines
623 B
Go

package sphero
import (
. "github.com/onsi/ginkgo"
. "github.com/onsi/gomega"
)
var _ = Describe("SpheroAdaptor", func() {
var (
a *SpheroAdaptor
)
BeforeEach(func() {
a = NewSpheroAdaptor("bot", "/dev/null")
a.sp = sp{}
a.connect = func(a *SpheroAdaptor) {}
})
It("Must be able to Finalize", func() {
Expect(a.Finalize()).To(Equal(true))
})
It("Must be able to Connect", func() {
Expect(a.Connect()).To(Equal(true))
})
It("Must be able to Disconnect", func() {
Expect(a.Disconnect()).To(Equal(true))
})
It("Must be able to Reconnect", func() {
Expect(a.Reconnect()).To(Equal(true))
})
})