File: ignore_test.go

package info (click to toggle)
golang-gomega 1.0%2Bgit20160910.d59fa0a-1~bpo8%2B1
  • links: PTS, VCS
  • area: main
  • in suites: jessie-backports
  • size: 728 kB
  • sloc: makefile: 12
file content (23 lines) | stat: -rw-r--r-- 488 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
package gstruct_test

import (
	. "github.com/onsi/ginkgo"
	. "github.com/onsi/gomega"
	. "github.com/onsi/gomega/gstruct"
)

var _ = Describe("Ignore", func() {
	It("should always succeed", func() {
		Ω(nil).Should(Ignore())
		Ω(struct{}{}).Should(Ignore())
		Ω(0).Should(Ignore())
		Ω(false).Should(Ignore())
	})

	It("should always fail", func() {
		Ω(nil).ShouldNot(Reject())
		Ω(struct{}{}).ShouldNot(Reject())
		Ω(1).ShouldNot(Reject())
		Ω(true).ShouldNot(Reject())
	})
})