aboutsummaryrefslogtreecommitdiff
path: root/vendor/github.com/onsi/ginkgo/internal/writer
diff options
context:
space:
mode:
authorValentin Rothberg <rothberg@redhat.com>2019-06-24 11:29:13 +0200
committerValentin Rothberg <rothberg@redhat.com>2019-06-24 13:20:59 +0200
commitd697456dc90adbaf68224ed7c115b38d5855e582 (patch)
tree5fd88c48b34e7bead0028fa97e39f43f03880642 /vendor/github.com/onsi/ginkgo/internal/writer
parenta3211b73c62a9fcc13f09305bf629ef507b26d34 (diff)
downloadpodman-d697456dc90adbaf68224ed7c115b38d5855e582.tar.gz
podman-d697456dc90adbaf68224ed7c115b38d5855e582.tar.bz2
podman-d697456dc90adbaf68224ed7c115b38d5855e582.zip
migrate to go-modules
Signed-off-by: Valentin Rothberg <rothberg@redhat.com>
Diffstat (limited to 'vendor/github.com/onsi/ginkgo/internal/writer')
-rw-r--r--vendor/github.com/onsi/ginkgo/internal/writer/writer_suite_test.go13
-rw-r--r--vendor/github.com/onsi/ginkgo/internal/writer/writer_test.go75
2 files changed, 0 insertions, 88 deletions
diff --git a/vendor/github.com/onsi/ginkgo/internal/writer/writer_suite_test.go b/vendor/github.com/onsi/ginkgo/internal/writer/writer_suite_test.go
deleted file mode 100644
index e20657791..000000000
--- a/vendor/github.com/onsi/ginkgo/internal/writer/writer_suite_test.go
+++ /dev/null
@@ -1,13 +0,0 @@
-package writer_test
-
-import (
- . "github.com/onsi/ginkgo"
- . "github.com/onsi/gomega"
-
- "testing"
-)
-
-func TestWriter(t *testing.T) {
- RegisterFailHandler(Fail)
- RunSpecs(t, "Writer Suite")
-}
diff --git a/vendor/github.com/onsi/ginkgo/internal/writer/writer_test.go b/vendor/github.com/onsi/ginkgo/internal/writer/writer_test.go
deleted file mode 100644
index 3e1d17c6d..000000000
--- a/vendor/github.com/onsi/ginkgo/internal/writer/writer_test.go
+++ /dev/null
@@ -1,75 +0,0 @@
-package writer_test
-
-import (
- "github.com/onsi/gomega/gbytes"
-
- . "github.com/onsi/ginkgo"
- . "github.com/onsi/ginkgo/internal/writer"
- . "github.com/onsi/gomega"
-)
-
-var _ = Describe("Writer", func() {
- var writer *Writer
- var out *gbytes.Buffer
-
- BeforeEach(func() {
- out = gbytes.NewBuffer()
- writer = New(out)
- })
-
- It("should stream directly to the outbuffer by default", func() {
- writer.Write([]byte("foo"))
- Ω(out).Should(gbytes.Say("foo"))
- })
-
- It("should not emit the header when asked to DumpOutWitHeader", func() {
- writer.Write([]byte("foo"))
- writer.DumpOutWithHeader("my header")
- Ω(out).ShouldNot(gbytes.Say("my header"))
- Ω(out).Should(gbytes.Say("foo"))
- })
-
- Context("when told not to stream", func() {
- BeforeEach(func() {
- writer.SetStream(false)
- })
-
- It("should only write to the buffer when told to DumpOut", func() {
- writer.Write([]byte("foo"))
- Ω(out).ShouldNot(gbytes.Say("foo"))
- writer.DumpOut()
- Ω(out).Should(gbytes.Say("foo"))
- })
-
- It("should truncate the internal buffer when told to truncate", func() {
- writer.Write([]byte("foo"))
- writer.Truncate()
- writer.DumpOut()
- Ω(out).ShouldNot(gbytes.Say("foo"))
-
- writer.Write([]byte("bar"))
- writer.DumpOut()
- Ω(out).Should(gbytes.Say("bar"))
- })
-
- Describe("emitting a header", func() {
- Context("when the buffer has content", func() {
- It("should emit the header followed by the content", func() {
- writer.Write([]byte("foo"))
- writer.DumpOutWithHeader("my header")
-
- Ω(out).Should(gbytes.Say("my header"))
- Ω(out).Should(gbytes.Say("foo"))
- })
- })
-
- Context("when the buffer has no content", func() {
- It("should not emit the header", func() {
- writer.DumpOutWithHeader("my header")
-
- Ω(out).ShouldNot(gbytes.Say("my header"))
- })
- })
- })
- })
-})