// +build convey package incr import ( . "github.com/smartystreets/goconvey/convey" "testing" ) func TestOnce(t *testing.T) { Convey("Given some integer with a starting value", t, func() { x := 1 Convey("When the integer is incremented", func() { x++ Convey("The value should be greater by one", func() { So(x, ShouldEqual, 2) }) }) }) } func TestTwice(t *testing.T) { Convey("Given some integer with a starting value", t, func() { x := 1 Convey("When the integer is incremented", func() { x++ Convey("The value should be greater by one", func() { So(x, ShouldEqual, 2) }) }) // the name has to be updated, if you try to use the name twice, Convey // explodes. Convey("When the integer is incremented again", func() { x++ Convey("The value should be greater by one", func() { So(x, ShouldEqual, 2) }) }) }) }