"some-key": "some-value", "InstanceCount": "4", } awsClient.URLForObjectCall.Returns.URL = "some-url" awsClient.GetHostsFromStackIDCall.Returns.Hosts = map[string]string{ "host-a": "running", "host-b": "stopped", "host-c": "who-knows", "host-d": "reticulating-splines", } }) Context("when the format is json", func() { It("should return the state of the CloudFormation stack", func() { jsonFmt, err := c.DescribeClassroom(classroomName, "json") Expect(err).NotTo(HaveOccurred()) Expect(jsonFmt).To(MatchJSON(`{ "status": "SOME_CLOUDFORMATION_STATUS", "ssh_key": "some-url", "number": 4, "hosts": { "host-a": "running", "host-b": "stopped", "host-c": "who-knows", "host-d": "reticulating-splines" } }`)) Expect(awsClient.GetHostsFromStackIDCall.Receives.StackID).To(Equal("some-stack-id")) })