Skip to content

Commit

Permalink
Merge pull request #20 from gobuffalo/use-packd-interfaces
Browse files Browse the repository at this point in the history
use packd
  • Loading branch information
markbates authored Nov 17, 2018
2 parents 9c31642 + c5e00c2 commit 122daf0
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ Often it is useful to load a series of data into the database at the start of th

### Usage

First you need to setup your test suite to use fixtures. You can do this by using `suite.NewActionWithFixtures` or `suite.NewModelWithFixtures` methods to create new test suites that take a `packr.Box` pointing to where the files for this suite live.
First you need to setup your test suite to use fixtures. You can do this by using `suite.NewActionWithFixtures` or `suite.NewModelWithFixtures` methods to create new test suites that take a `packd.Box` pointing to where the files for this suite live.

```go
package actions
Expand Down
4 changes: 2 additions & 2 deletions fix/plush.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,14 @@ import (
"io/ioutil"
"time"

"github.com/gobuffalo/packr"
"github.com/gobuffalo/packd"
"github.com/gobuffalo/plush"
"github.com/gobuffalo/uuid"
"github.com/pkg/errors"
"golang.org/x/crypto/bcrypt"
)

func render(file packr.File) (string, error) {
func render(file packd.File) (string, error) {
b, err := ioutil.ReadAll(file)
if err != nil {
return "", errors.WithStack(err)
Expand Down
4 changes: 2 additions & 2 deletions suite.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import (
"github.com/gobuffalo/buffalo"
"github.com/gobuffalo/httptest"
"github.com/gobuffalo/mw-csrf"
"github.com/gobuffalo/packr"
"github.com/gobuffalo/packd"
"github.com/pkg/errors"
"github.com/stretchr/testify/suite"
)
Expand All @@ -27,7 +27,7 @@ func NewAction(app *buffalo.App) *Action {
return as
}

func NewActionWithFixtures(app *buffalo.App, box packr.Box) (*Action, error) {
func NewActionWithFixtures(app *buffalo.App, box packd.Box) (*Action, error) {
m, err := NewModelWithFixtures(box)
if err != nil {
return nil, errors.WithStack(err)
Expand Down

0 comments on commit 122daf0

Please sign in to comment.