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