From b318eef6c4cb245ec4335a4c61f8d57b4234d2d3 Mon Sep 17 00:00:00 2001 From: Adrian Zankich Date: Thu, 12 Jun 2014 16:12:38 -0700 Subject: [PATCH] Update beaglebone tests --- .../beaglebone/beaglebone_adaptor_test.go | 41 +++++++++---------- .../beaglebone/gobot-beaglebone_suite_test.go | 13 ------ 2 files changed, 19 insertions(+), 35 deletions(-) delete mode 100644 platforms/beaglebone/gobot-beaglebone_suite_test.go diff --git a/platforms/beaglebone/beaglebone_adaptor_test.go b/platforms/beaglebone/beaglebone_adaptor_test.go index 20c3da29..90b3b49c 100644 --- a/platforms/beaglebone/beaglebone_adaptor_test.go +++ b/platforms/beaglebone/beaglebone_adaptor_test.go @@ -1,29 +1,26 @@ package beaglebone import ( - . "github.com/onsi/ginkgo" - . "github.com/onsi/gomega" + "github.com/hybridgroup/gobot" + "testing" ) -var _ = Describe("Beaglebone", func() { - var ( - b *BeagleboneAdaptor - ) +var b *BeagleboneAdaptor - BeforeEach(func() { - b = NewBeagleboneAdaptor("bot") - }) +func init() { + b = NewBeagleboneAdaptor("bot") +} - It("Must be able to Finalize", func() { - Expect(b.Finalize()).To(Equal(true)) - }) - It("Must be able to Connect", func() { - Expect(b.Connect()).To(Equal(true)) - }) - It("Must be able to Disconnect", func() { - Expect(b.Disconnect()).To(Equal(true)) - }) - It("Must be able to Reconnect", func() { - Expect(b.Reconnect()).To(Equal(true)) - }) -}) +func TestFinalize(t *testing.T) { + gobot.Expect(t, b.Finalize(), true) +} + +func TestConnect(t *testing.T) { + gobot.Expect(t, b.Connect(), true) +} +func TestDisconnect(t *testing.T) { + gobot.Expect(t, b.Disconnect(), true) +} +func TestReconnect(t *testing.T) { + gobot.Expect(t, b.Reconnect(), true) +} diff --git a/platforms/beaglebone/gobot-beaglebone_suite_test.go b/platforms/beaglebone/gobot-beaglebone_suite_test.go deleted file mode 100644 index 8b5a7028..00000000 --- a/platforms/beaglebone/gobot-beaglebone_suite_test.go +++ /dev/null @@ -1,13 +0,0 @@ -package beaglebone - -import ( - . "github.com/onsi/ginkgo" - . "github.com/onsi/gomega" - - "testing" -) - -func TestGobotBeaglebone(t *testing.T) { - RegisterFailHandler(Fail) - RunSpecs(t, "Gobot-Beaglebone Suite") -}