Skip to content

Commit

Permalink
readme update
Browse files Browse the repository at this point in the history
  • Loading branch information
nikandfor committed Feb 13, 2020
1 parent 2e8e671 commit db54099
Showing 1 changed file with 24 additions and 24 deletions.
48 changes: 24 additions & 24 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
Testify - Thou Shalt Write Tests
================================

[![Build Status](https://travis-ci.org/stretchr/testify.svg)](https://travis-ci.org/stretchr/testify) [![Go Report Card](https://goreportcard.com/badge/github.com/stretchr/testify)](https://goreportcard.com/report/github.com/stretchr/testify) [![GoDoc](https://godoc.org/github.com/stretchr/testify?status.svg)](https://godoc.org/github.com/stretchr/testify)
[![Build Status](https://travis-ci.org/nikandfor/testify.svg)](https://travis-ci.org/nikandfor/testify) [![Go Report Card](https://goreportcard.com/badge/github.com/nikandfor/testify)](https://goreportcard.com/report/github.com/nikandfor/testify) [![GoDoc](https://godoc.org/github.com/nikandfor/testify?status.svg)](https://go.pkg.dev/github.com/nikandfor/testify)

Go code (golang) set of packages that provide many tools for testifying that your code will behave as you intend.

Expand All @@ -15,13 +15,13 @@ Get started:

* Install testify with [one line of code](#installation), or [update it with another](#staying-up-to-date)
* For an introduction to writing test code in Go, see http://golang.org/doc/code.html#Testing
* Check out the API Documentation http://godoc.org/github.com/stretchr/testify
* To make your testing life easier, check out our other project, [gorc](http://github.com/stretchr/gorc)
* Check out the API Documentation http://godoc.org/github.com/nikandfor/testify
* To make your testing life easier, check out our other project, [gorc](http://github.com/nikandfor/gorc)
* A little about [Test-Driven Development (TDD)](http://en.wikipedia.org/wiki/Test-driven_development)



[`assert`](http://godoc.org/github.com/stretchr/testify/assert "API documentation") package
[`assert`](http://godoc.org/github.com/nikandfor/testify/assert "API documentation") package
-------------------------------------------------------------------------------------------

The `assert` package provides some helpful methods that allow you to write better test code in Go.
Expand All @@ -37,7 +37,7 @@ package yours

import (
"testing"
"github.com/stretchr/testify/assert"
"github.com/nikandfor/testify/assert"
)

func TestSomething(t *testing.T) {
Expand Down Expand Up @@ -73,7 +73,7 @@ package yours

import (
"testing"
"github.com/stretchr/testify/assert"
"github.com/nikandfor/testify/assert"
)

func TestSomething(t *testing.T) {
Expand All @@ -98,14 +98,14 @@ func TestSomething(t *testing.T) {
}
```

[`require`](http://godoc.org/github.com/stretchr/testify/require "API documentation") package
[`require`](http://godoc.org/github.com/nikandfor/testify/require "API documentation") package
---------------------------------------------------------------------------------------------

The `require` package provides same global functions as the `assert` package, but instead of returning a boolean result they terminate current test.

See [t.FailNow](http://golang.org/pkg/testing/#T.FailNow) for details.

[`mock`](http://godoc.org/github.com/stretchr/testify/mock "API documentation") package
[`mock`](http://godoc.org/github.com/nikandfor/testify/mock "API documentation") package
----------------------------------------------------------------------------------------

The `mock` package provides a mechanism for easily writing mock objects that can be used in place of real objects when writing test code.
Expand All @@ -117,7 +117,7 @@ package yours

import (
"testing"
"github.com/stretchr/testify/mock"
"github.com/nikandfor/testify/mock"
)

/*
Expand Down Expand Up @@ -190,11 +190,11 @@ func TestSomethingElse(t *testing.T) {
}
```

For more information on how to write mock code, check out the [API documentation for the `mock` package](http://godoc.org/github.com/stretchr/testify/mock).
For more information on how to write mock code, check out the [API documentation for the `mock` package](http://godoc.org/github.com/nikandfor/testify/mock).

You can use the [mockery tool](http://github.com/vektra/mockery) to autogenerate the mock code against an interface as well, making using mocks much quicker.

[`suite`](http://godoc.org/github.com/stretchr/testify/suite "API documentation") package
[`suite`](http://godoc.org/github.com/nikandfor/testify/suite "API documentation") package
-----------------------------------------------------------------------------------------

The `suite` package provides functionality that you might be used to from more common object oriented languages. With it, you can build a testing suite as a struct, build setup/teardown methods and testing methods on your struct, and run them with 'go test' as per normal.
Expand All @@ -205,8 +205,8 @@ An example suite is shown below:
// Basic imports
import (
"testing"
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/suite"
"github.com/nikandfor/testify/assert"
"github.com/nikandfor/testify/suite"
)

// Define the suite, and absorb the built-in basic suite
Expand Down Expand Up @@ -236,17 +236,17 @@ func TestExampleTestSuite(t *testing.T) {
}
```

For a more complete example, using all of the functionality provided by the suite package, look at our [example testing suite](https://github.com/stretchr/testify/blob/master/suite/suite_test.go)
For a more complete example, using all of the functionality provided by the suite package, look at our [example testing suite](https://github.com/nikandfor/testify/blob/master/suite/suite_test.go)

For more information on writing suites, check out the [API documentation for the `suite` package](http://godoc.org/github.com/stretchr/testify/suite).
For more information on writing suites, check out the [API documentation for the `suite` package](http://godoc.org/github.com/nikandfor/testify/suite).

`Suite` object has assertion methods:

```go
// Basic imports
import (
"testing"
"github.com/stretchr/testify/suite"
"github.com/nikandfor/testify/suite"
)

// Define the suite, and absorb the built-in basic suite
Expand Down Expand Up @@ -282,15 +282,15 @@ Installation

To install Testify, use `go get`:

go get github.com/stretchr/testify
go get github.com/nikandfor/testify

This will then make the following packages available to you:

github.com/stretchr/testify/assert
github.com/stretchr/testify/require
github.com/stretchr/testify/mock
github.com/stretchr/testify/suite
github.com/stretchr/testify/http (deprecated)
github.com/nikandfor/testify/assert
github.com/nikandfor/testify/require
github.com/nikandfor/testify/mock
github.com/nikandfor/testify/suite
github.com/nikandfor/testify/http (deprecated)

Import the `testify/assert` package into your code using this template:

Expand All @@ -299,7 +299,7 @@ package yours

import (
"testing"
"github.com/stretchr/testify/assert"
"github.com/nikandfor/testify/assert"
)

func TestSomething(t *testing.T) {
Expand All @@ -314,7 +314,7 @@ func TestSomething(t *testing.T) {
Staying up to date
==================

To update Testify to the latest version, use `go get -u github.com/stretchr/testify`.
To update Testify to the latest version, use `go get -u github.com/nikandfor/testify`.

------

Expand Down

0 comments on commit db54099

Please sign in to comment.