Skip to content

Commit

Permalink
Refer to recently migrated assertions module.
Browse files Browse the repository at this point in the history
Closes #52
  • Loading branch information
mdwhatcott committed Jun 28, 2023
1 parent 1705da8 commit 485adb0
Show file tree
Hide file tree
Showing 7 changed files with 13 additions and 13 deletions.
4 changes: 2 additions & 2 deletions convey/assertions.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@ package convey

//go:generate ./update_assertions.sh

import "github.com/smartystreets/assertions"
import "github.com/smarty/assertions"

// These assertions are forwarded from github.com/smartystreets/assertions
// These assertions are forwarded from github.com/smarty/assertions
// in order to make convey self-contained.
var (
ShouldAlmostEqual = assertions.ShouldAlmostEqual
Expand Down
2 changes: 1 addition & 1 deletion convey/init.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import (
"os"

"github.com/jtolds/gls"
"github.com/smartystreets/assertions"
"github.com/smarty/assertions"
"github.com/smartystreets/goconvey/convey/reporting"
)

Expand Down
2 changes: 1 addition & 1 deletion convey/reporting/reports.go
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ func removePackagePath(name string) string {

/////////////////// FailureView ////////////////////////

// This struct is also declared in github.com/smartystreets/assertions.
// FailureView is also declared in github.com/smarty/assertions.
// The json struct tags should be equal in both declarations.
type FailureView struct {
Message string `json:"Message"`
Expand Down
4 changes: 2 additions & 2 deletions convey/reporting_hooks_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ func TestComparisonFailureDeserializedAndReported(t *testing.T) {
So("hi", ShouldEqual, "bye")
})

expectEqual(t, "Begin|A|Failure(bye/hi)|Exit|End", myReporter.wholeStory())
expectEqual(t, `Begin|A|Failure("bye"/"hi")|Exit|End`, myReporter.wholeStory())
}

func TestNestedFailureReported(t *testing.T) {
Expand Down Expand Up @@ -311,7 +311,7 @@ func (self *fakeReporter) wholeStory() string {

type fakeGoTest struct{}

func (self *fakeGoTest) Fail() {}
func (self *fakeGoTest) Fail() {}
func (self *fakeGoTest) Fatalf(format string, args ...any) {}

var test t = new(fakeGoTest)
8 changes: 4 additions & 4 deletions convey/update_assertions.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
cd "$(dirname $(realpath $0))"

ASSERTIONS=($(
go tool nm "$(go list -export -f '{{.Export}}' github.com/smartystreets/assertions)" |\
awk '/ T github\.com\/smartystreets\/assertions\.Should/{split($3, a, "."); print a[3]}' |\
go tool nm "$(go list -export -f '{{.Export}}' github.com/smarty/assertions)" |\
awk '/ T github\.com\/smarty\/assertions\.Should/{split($3, a, "."); print a[3]}' |\
sort | uniq))

(
Expand All @@ -14,9 +14,9 @@ ASSERTIONS=($(
echo
echo "//go:generate ./update_assertions.sh"
echo
echo "import \"github.com/smartystreets/assertions\""
echo "import \"github.com/smarty/assertions\""
echo
echo "// These assertions are forwarded from github.com/smartystreets/assertions"
echo "// These assertions are forwarded from github.com/smarty/assertions"
echo "// in order to make convey self-contained."
echo "var ("

Expand Down
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ go 1.18

require (
github.com/jtolds/gls v4.20.0+incompatible
github.com/smartystreets/assertions v1.13.1
github.com/smarty/assertions v1.15.0
golang.org/x/tools v0.7.0
)

Expand Down
4 changes: 2 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ github.com/gopherjs/gopherjs v1.17.2 h1:fQnZVsXk8uxXIStYb0N4bGk7jeyTalG/wsZjQ25d
github.com/gopherjs/gopherjs v1.17.2/go.mod h1:pRRIvn/QzFLrKfvEz3qUuEhtE/zLCWfreZ6J5gM2i+k=
github.com/jtolds/gls v4.20.0+incompatible h1:xdiiI2gbIgH/gLH7ADydsJ1uDOEzR8yvV7C0MuV77Wo=
github.com/jtolds/gls v4.20.0+incompatible/go.mod h1:QJZ7F/aHp+rZTRtaJ1ow/lLfFfVYBRgL+9YlvaHOwJU=
github.com/smartystreets/assertions v1.13.1 h1:Ef7KhSmjZcK6AVf9YbJdvPYG9avaF0ZxudX+ThRdWfU=
github.com/smartystreets/assertions v1.13.1/go.mod h1:cXr/IwVfSo/RbCSPhoAPv73p3hlSdrBH/b3SdnW/LMY=
github.com/smarty/assertions v1.15.0 h1:cR//PqUBUiQRakZWqBiFFQ9wb8emQGDb0HeGdqGByCY=
github.com/smarty/assertions v1.15.0/go.mod h1:yABtdzeQs6l1brC900WlRNwj6ZR55d7B+E8C6HtKdec=
golang.org/x/mod v0.9.0 h1:KENHtAZL2y3NLMYZeHY9DW8HW8V+kQyJsY/V9JlKvCs=
golang.org/x/mod v0.9.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs=
golang.org/x/sync v0.1.0 h1:wsuoTGHzEhffawBOhz5CYhcrV4IdKZbEyZjBMuTp12o=
Expand Down

0 comments on commit 485adb0

Please sign in to comment.