forked from paketo-buildpacks/dotnet-core-runtime
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathlog_emitter_test.go
More file actions
36 lines (28 loc) · 777 Bytes
/
log_emitter_test.go
File metadata and controls
36 lines (28 loc) · 777 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
package dotnetcoreruntime_test
import (
"bytes"
"testing"
dotnetcoreruntime "github.com/paketo-buildpacks/dotnet-core-runtime"
"github.com/paketo-buildpacks/packit"
"github.com/sclevine/spec"
. "github.com/onsi/gomega"
)
func testLogEmitter(t *testing.T, context spec.G, it spec.S) {
var (
Expect = NewWithT(t).Expect
buffer *bytes.Buffer
emitter dotnetcoreruntime.LogEmitter
)
it.Before(func() {
buffer = bytes.NewBuffer(nil)
emitter = dotnetcoreruntime.NewLogEmitter(buffer)
})
context("Environment", func() {
it("prints details about the environment", func() {
emitter.Environment(packit.Environment{
"GEM_PATH.override": "/some/path",
})
Expect(buffer.String()).To(ContainSubstring(" GEM_PATH -> \"/some/path\""))
})
})
}