1
0
mirror of https://github.com/hybridgroup/gobot.git synced 2025-04-29 13:49:14 +08:00
hybridgroup.gobot/robot_test.go

55 lines
1.0 KiB
Go
Raw Normal View History

2013-12-01 22:16:02 -08:00
package gobot
import (
2013-12-02 17:10:36 -08:00
. "github.com/onsi/ginkgo"
. "github.com/onsi/gomega"
2013-12-01 22:16:02 -08:00
)
var _ = Describe("Robot", func() {
2013-12-02 17:10:36 -08:00
var (
someRobot Robot
)
2013-12-01 22:16:02 -08:00
2013-12-02 17:10:36 -08:00
BeforeEach(func() {
someRobot = Robot{
Work: func() {
},
}
})
2013-12-01 22:16:02 -08:00
2013-12-02 17:10:36 -08:00
Context("when valid", func() {
It("initName should not change name when already set", func() {
someRobot.Name = "Bumblebee"
someRobot.initName()
Expect(someRobot.Name).To(Equal("Bumblebee"))
})
It("initName should set random name when not set", func() {
someRobot.initName()
Expect(someRobot.Name).NotTo(BeNil())
Expect(someRobot.Name).NotTo(Equal("Bumblebee"))
})
PIt("should Start", func() {
Expect(true)
})
PIt("should initConnections", func() {
Expect(true)
})
PIt("should initDevices", func() {
Expect(true)
})
PIt("should startConnections", func() {
Expect(true)
})
PIt("should startDevices", func() {
Expect(true)
})
PIt("should GetDevices", func() {
Expect(true)
})
PIt("should GetDevice", func() {
Expect(true)
})
})
2013-12-01 22:16:02 -08:00
})