func TestGLSWith(t *testing.T) { is := is.New(t) With(Values{"key": "value"}, func() { v := Get("key") is.NotNil(v) is.Equal(v, "value") }) v := Get("key") is.Nil(v) }
func TestGLSSetValues(t *testing.T) { is := is.New(t) Set("key", "value") v := Get("key") is.NotNil(v) is.Equal(v, "value") SetValues(Values{"answer": 42}) v = Get("key") is.Nil(v) v = Get("answer") is.NotNil(v) is.Equal(v, 42) Cleanup() }