File: each_no_test.go

package info (click to toggle)
golang-github-karlseguin-expect 1.0.1+git20160716.12.5c2eadb-2
  • links: PTS, VCS
  • area: main
  • in suites: bullseye, sid
  • size: 172 kB
  • sloc: makefile: 6
file content (22 lines) | stat: -rw-r--r-- 304 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
package expect

import (
	"testing"
)

type EachNoTests struct {
	called int
}

func Test_EachNo(t *testing.T) {
	Expectify(new(EachNoTests), t)
}

func (et *EachNoTests) DoesNotRunEach() {
	Expect(et.called).Less.Than(2)
}

func (et *EachNoTests) Each() {
	et.called++
	Expect(et.called).Less.Than(2)
}