File: each_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-- 273 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 EachTests struct {
	called bool
}

func Test_Each(t *testing.T) {
	Expectify(new(EachTests), t)
}

func (e *EachTests) RunsEach() {
	Expect(e.called).To.Equal(true)
}

func (e *EachTests) Each(f func()) {
	e.called = true
	f()
}