Skip to content

Commit

Permalink
Replace deprecated NewGomegaWithT with NewWithT (#659)
Browse files Browse the repository at this point in the history
  • Loading branch information
luistm committed Apr 17, 2023
1 parent 29ed041 commit a19238f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions docs/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -60,14 +60,14 @@ To use Gomega with Golang's XUnit style tests:

```go
func TestFarmHasCow(t *testing.T) {
g := NewGomegaWithT(t)
g := NewWithT(t)

f := farm.New([]string{"Cow", "Horse"})
g.Expect(f.HasCow()).To(BeTrue(), "Farm should have cow")
}
```

`NewGomegaWithT(t)` wraps a `*testing.T` and returns a struct that supports `Expect`, `Eventually`, and `Consistently`.
`NewWithT(t)` wraps a `*testing.T` and returns a struct that supports `Expect`, `Eventually`, and `Consistently`.

## Making Assertions

Expand Down

0 comments on commit a19238f

Please sign in to comment.