Skip to content

Commit

Permalink
Make it work on GitHub Actions env
Browse files Browse the repository at this point in the history
  • Loading branch information
otiai10 committed Apr 5, 2023
1 parent ad02ebd commit b5e0106
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions curr/all_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ package curr

import (
"os"
"path/filepath"
"testing"

. "github.com/otiai10/mint"
Expand All @@ -13,14 +14,16 @@ func init() {
pkgpath = os.Getenv("GITHUB_WORKSPACE")
if pkgpath == "" {
pkgpath = os.Getenv("GOPATH") + "/src/github.com/otiai10/mint/curr"
} else {
pkgpath = filepath.Join(pkgpath, "curr")
}
}

func TestLine(t *testing.T) {
Because(t, "Line() should provide current line", func(t *testing.T) {
Expect(t, Line()).ToBe(21)
// <- line 22
Expect(t, Line()).ToBe(23)
Expect(t, Line()).ToBe(24)
// <- line 25
Expect(t, Line()).ToBe(26)
})
}

Expand Down

0 comments on commit b5e0106

Please sign in to comment.