Skip to content
Let your code know how it disappoints you.
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
.gitignore
LICENSE
README.md
testivus.go
testivus_test.go

README.md

testivus

Documentation

A test helper library for the rest of us. Let your code know how it disappoints you.

Example Usage

package testivus_test

import (
	"testing"

	"github.com/britt/testivus"
)

func TestMain(m *testing.M) {
	testivus.Run(m)
}

func TestTestivus(t *testing.T) {
	if 1 == 2 {
		t.Fail()
	}

	testivus.Grievance(t, "My son tells me your company stinks!")
	testivus.Grievance(t, "You're slow!", "speed").WithError(err)
	testivus.Grievance(t, "You're send too much data!", "speed", "download")
}

Output

> go test -timeout 30s github.com/britt/testivus -v -testivus.outputfile testivus.json

=== RUN   TestTestivus
	DISAPPOINTMENT: My son tells me your company stinks!
	DISAPPOINTMENT: You're slow! (speed)
	DISAPPOINTMENT: You're send too much data! (speed, download)
--- PASS: TestTestivus (0.00s)
PASS

=== The airing of grievances:
I gotta lot of problems with you people! (0 disappointments)

By Tag:
 speed    2 ||
 download 1 |

By Error:
 timeout exceeded 1 |

ok  	github.com/britt/testivus	0.019s
You can’t perform that action at this time.