Value: float64(70.0), } }) It("turns on", func() { Expect(therm.On(val)).To(BeNil()) msg := &gogadgets.Message{ Sender: "my thermometer", Value: gogadgets.Value{ Value: 70.1, }, } therm.Update(msg) b, err := ioutil.ReadFile(sys["cool-value"]) Expect(err).To(BeNil()) Expect(string(b)).To(Equal("1")) Expect(therm.Status()["cool"]).To(BeTrue()) }) It("gives the right status", func() { Expect(therm.Status()["cool"]).To(BeFalse()) Expect(therm.On(val)).To(BeNil()) msg := &gogadgets.Message{ Sender: "my thermometer", Value: gogadgets.Value{ Value: 70.1, }, } therm.Update(msg) Expect(therm.Status()["cool"]).To(BeTrue()) })