hybridgroup.gobot/platforms/joystick/joystick_driver_test.go

27 lines
494 B
Go
Raw Normal View History

2014-04-28 09:02:39 +08:00
package joystick
import (
. "github.com/onsi/ginkgo"
. "github.com/onsi/gomega"
)
var _ = Describe("JoystickDriver", func() {
var (
2014-04-28 09:02:39 +08:00
d *JoystickDriver
)
BeforeEach(func() {
2014-05-23 11:28:26 +08:00
d = NewJoystickDriver(NewJoystickAdaptor("bot"), "bot", "/dev/null")
})
PIt("Must be able to Start", func() {
2014-04-28 09:02:39 +08:00
Expect(d.Start()).To(Equal(true))
})
PIt("Must be able to Init", func() {
2014-04-28 09:02:39 +08:00
Expect(d.Init()).To(Equal(true))
})
PIt("Must be able to Halt", func() {
2014-04-28 09:02:39 +08:00
Expect(d.Halt()).To(Equal(true))
})
})