mirror of https://github.com/stretchr/testify.git
repo name change
parent
d2a8d94721
commit
ae878dc5c4
24
README.md
24
README.md
|
@ -12,8 +12,8 @@ Features include:
|
||||||
Get started:
|
Get started:
|
||||||
|
|
||||||
* Install testify with [one line of code](#installation), or [update it with another](#staying-up-to-date)
|
* Install testify with [one line of code](#installation), or [update it with another](#staying-up-to-date)
|
||||||
* Read the API Documentation http://go.pkgdoc.org/github.com/stretchrcom/testify
|
* Read the API Documentation http://go.pkgdoc.org/github.com/stretchr/testify
|
||||||
* To make your testing life easier, check out our other project, [gort](http://github.com/stretchrcom/gort)
|
* To make your testing life easier, check out our other project, [gort](http://github.com/stretchr/gort)
|
||||||
* For an introduction to writing test code in Go, see http://golang.org/doc/code.html#Testing
|
* For an introduction to writing test code in Go, see http://golang.org/doc/code.html#Testing
|
||||||
* A little about [Test-Driven Development (TDD)](http://en.wikipedia.org/wiki/Test-driven_development)
|
* A little about [Test-Driven Development (TDD)](http://en.wikipedia.org/wiki/Test-driven_development)
|
||||||
|
|
||||||
|
@ -22,7 +22,7 @@ Get started:
|
||||||
`assert` package
|
`assert` package
|
||||||
----------------
|
----------------
|
||||||
|
|
||||||
The `assert` package provides some helpful methods that allow you to write better test code in Go. Check out the [API documentation for the `assert` package](http://go.pkgdoc.org/github.com/stretchrcom/testify/assert).
|
The `assert` package provides some helpful methods that allow you to write better test code in Go. Check out the [API documentation for the `assert` package](http://go.pkgdoc.org/github.com/stretchr/testify/assert).
|
||||||
|
|
||||||
* Prints friendly, easy to read failure descriptions
|
* Prints friendly, easy to read failure descriptions
|
||||||
* Allows for very readable code
|
* Allows for very readable code
|
||||||
|
@ -58,7 +58,7 @@ See it in action:
|
||||||
`http` package
|
`http` package
|
||||||
--------------
|
--------------
|
||||||
|
|
||||||
The `http` package contains test objects useful for testing code that relies on the `net/http` package. Check out the [API documentation for the `http` package](http://go.pkgdoc.org/github.com/stretchrcom/testify/http).
|
The `http` package contains test objects useful for testing code that relies on the `net/http` package. Check out the [API documentation for the `http` package](http://go.pkgdoc.org/github.com/stretchr/testify/http).
|
||||||
|
|
||||||
`mock` package
|
`mock` package
|
||||||
--------------
|
--------------
|
||||||
|
@ -71,7 +71,7 @@ An example test function that tests a piece of code that relies on an external o
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"testing"
|
"testing"
|
||||||
"github.com/stretchrcom/testify/mock"
|
"github.com/stretchr/testify/mock"
|
||||||
)
|
)
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
@ -120,7 +120,7 @@ An example test function that tests a piece of code that relies on an external o
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
For more information on how to write mock code, check out the [API documentation for the `mock` package](http://go.pkgdoc.org/github.com/stretchrcom/testify/mock).
|
For more information on how to write mock code, check out the [API documentation for the `mock` package](http://go.pkgdoc.org/github.com/stretchr/testify/mock).
|
||||||
|
|
||||||
------
|
------
|
||||||
|
|
||||||
|
@ -129,13 +129,13 @@ Installation
|
||||||
|
|
||||||
To install Testify, use `go get`:
|
To install Testify, use `go get`:
|
||||||
|
|
||||||
go get github.com/stretchrcom/testify
|
go get github.com/stretchr/testify
|
||||||
|
|
||||||
This will then make the following packages available to you:
|
This will then make the following packages available to you:
|
||||||
|
|
||||||
github.com/stretchrcom/testify/assert
|
github.com/stretchr/testify/assert
|
||||||
github.com/stretchrcom/testify/mock
|
github.com/stretchr/testify/mock
|
||||||
github.com/stretchrcom/testify/http
|
github.com/stretchr/testify/http
|
||||||
|
|
||||||
Import the `testify/assert` package into your code using this template:
|
Import the `testify/assert` package into your code using this template:
|
||||||
|
|
||||||
|
@ -143,7 +143,7 @@ Import the `testify/assert` package into your code using this template:
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"testing"
|
"testing"
|
||||||
"github.com/stretchrcom/testify/assert"
|
"github.com/stretchr/testify/assert"
|
||||||
)
|
)
|
||||||
|
|
||||||
func TestSomething(t *testing.T) {
|
func TestSomething(t *testing.T) {
|
||||||
|
@ -159,7 +159,7 @@ Staying up to date
|
||||||
|
|
||||||
To update Testify, use `go get -u`:
|
To update Testify, use `go get -u`:
|
||||||
|
|
||||||
go get -u github.com/stretchrcom/testify
|
go get -u github.com/stretchr/testify
|
||||||
|
|
||||||
------
|
------
|
||||||
|
|
||||||
|
|
|
@ -5,7 +5,7 @@
|
||||||
// The following is a complete example using assert in a standard test function:
|
// The following is a complete example using assert in a standard test function:
|
||||||
// import (
|
// import (
|
||||||
// "testing"
|
// "testing"
|
||||||
// "github.com/stretchrcom/testify/assert"
|
// "github.com/stretchr/testify/assert"
|
||||||
// )
|
// )
|
||||||
//
|
//
|
||||||
// func TestSomething(t *testing.T) {
|
// func TestSomething(t *testing.T) {
|
||||||
|
|
|
@ -2,8 +2,8 @@ package mock
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"fmt"
|
"fmt"
|
||||||
"github.com/stretchrcom/stew/objects"
|
"github.com/stretchr/stew/objects"
|
||||||
"github.com/stretchrcom/testify/assert"
|
"github.com/stretchr/testify/assert"
|
||||||
"reflect"
|
"reflect"
|
||||||
"runtime"
|
"runtime"
|
||||||
"strings"
|
"strings"
|
||||||
|
|
|
@ -2,7 +2,7 @@ package mock
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"errors"
|
"errors"
|
||||||
"github.com/stretchrcom/testify/assert"
|
"github.com/stretchr/testify/assert"
|
||||||
"testing"
|
"testing"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue