From c9db5da71120734abc3cec795c9a9d56ba70e2ca Mon Sep 17 00:00:00 2001 From: MarvinJWendt Date: Thu, 7 Apr 2022 16:32:18 +0200 Subject: [PATCH 1/4] fixes #114 --- assert.go | 6 +++--- assert_test.go | 4 ++-- output/fail_assertions_test.go | 4 ++-- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/assert.go b/assert.go index ebcea91..fb7db22 100644 --- a/assert.go +++ b/assert.go @@ -791,15 +791,15 @@ func AssertNoFileExists(t testRunner, file string, msg ...interface{}) { } } -// AssertDirExist asserts that a directory exists. +// AssertDirExists asserts that a directory exists. // The test will pass when the directory exists, and it's visible to the current user. // The test will fail, if the path points to a file. // // When using a custom message, the same formatting as with fmt.Sprintf() is used. // // Example: -// testza.AssertDirExist(t, "FolderName") -func AssertDirExist(t testRunner, dir string, msg ...interface{}) { +// testza.AssertDirExists(t, "FolderName") +func AssertDirExists(t testRunner, dir string, msg ...interface{}) { if test, ok := t.(helper); ok { test.Helper() } diff --git a/assert_test.go b/assert_test.go index f578980..6bbe946 100644 --- a/assert_test.go +++ b/assert_test.go @@ -1221,7 +1221,7 @@ func TestAssertNoFileExists_fail(t *testing.T) { func TestAssertDirExists(t *testing.T) { for _, dir := range []string{"ci", "internal", "testdata", os.TempDir()} { t.Run(dir, func(t *testing.T) { - AssertDirExist(t, dir) + AssertDirExists(t, dir) }) } } @@ -1230,7 +1230,7 @@ func TestAssertDirExists_fail(t *testing.T) { for _, dir := range []string{"asdasdasdasd", "LICENSE", "CHANGELOG.md"} { t.Run(dir, func(t *testing.T) { AssertTestFails(t, func(t TestingPackageWithFailFunctions) { - AssertDirExist(t, dir) + AssertDirExists(t, dir) }) }) } diff --git a/output/fail_assertions_test.go b/output/fail_assertions_test.go index 3175dcf..5375787 100644 --- a/output/fail_assertions_test.go +++ b/output/fail_assertions_test.go @@ -33,8 +33,8 @@ func TestOutput(t *testing.T) { testza.AssertDirEmpty(t, ".") }) - t.Run("AssertDirExist", func(t *testing.T) { - testza.AssertDirExist(t, ".") + t.Run("AssertDirExists", func(t *testing.T) { + testza.AssertDirExists(t, ".") }) t.Run("AssertDirNotEmpty", func(t *testing.T) { From 2ec317455cf5863eb4d7f8132f90971a1abe3757 Mon Sep 17 00:00:00 2001 From: MarvinJWendt Date: Thu, 7 Apr 2022 14:33:02 +0000 Subject: [PATCH 2/4] docs: autoupdate --- README.md | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index eace427..a6aa001 100644 --- a/README.md +++ b/README.md @@ -160,7 +160,7 @@ testza.FuzzStringRunTests(t, emailAddresses, func(t *testing.T, index int, str s - [AssertContains](https://github.com/MarvinJWendt/testza#AssertContains) - [AssertDecreasing](https://github.com/MarvinJWendt/testza#AssertDecreasing) - [AssertDirEmpty](https://github.com/MarvinJWendt/testza#AssertDirEmpty) - - [AssertDirExist](https://github.com/MarvinJWendt/testza#AssertDirExist) + - [AssertDirExists](https://github.com/MarvinJWendt/testza#AssertDirExists) - [AssertDirNotEmpty](https://github.com/MarvinJWendt/testza#AssertDirNotEmpty) - [AssertEqual](https://github.com/MarvinJWendt/testza#AssertEqual) - [AssertEqualValues](https://github.com/MarvinJWendt/testza#AssertEqualValues) @@ -387,13 +387,13 @@ Example: testza.AssertDirEmpty(t, "FolderName") -#### AssertDirExist +#### AssertDirExists ```go -func AssertDirExist(t testRunner, dir string, msg ...interface{}) +func AssertDirExists(t testRunner, dir string, msg ...interface{}) ``` -AssertDirExist asserts that a directory exists. The test will pass when the +AssertDirExists asserts that a directory exists. The test will pass when the directory exists, and it's visible to the current user. The test will fail, if the path points to a file. @@ -402,7 +402,7 @@ used. Example: - testza.AssertDirExist(t, "FolderName") + testza.AssertDirExists(t, "FolderName") #### AssertDirNotEmpty From 700968216230cb335f9128c284746d6d7a829abc Mon Sep 17 00:00:00 2001 From: MarvinJWendt Date: Thu, 7 Apr 2022 14:33:32 +0000 Subject: [PATCH 3/4] docs: autoupdate --- CHANGELOG.md | 6 +++++- README.md | 2 +- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index d82032e..e096745 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,9 @@ ## [Unreleased] + +## [v0.3.5] - 2022-04-07 + ## [v0.3.4] - 2022-04-07 @@ -301,7 +304,8 @@ Functions have a new structure. - **internal:** rewrite `Fail` for a nicer output -[Unreleased]: https://github.com/MarvinJWendt/testza/compare/v0.3.4...HEAD +[Unreleased]: https://github.com/MarvinJWendt/testza/compare/v0.3.5...HEAD +[v0.3.5]: https://github.com/MarvinJWendt/testza/compare/v0.3.4...v0.3.5 [v0.3.4]: https://github.com/MarvinJWendt/testza/compare/v0.3.3...v0.3.4 [v0.3.3]: https://github.com/MarvinJWendt/testza/compare/v0.3.2...v0.3.3 [v0.3.2]: https://github.com/MarvinJWendt/testza/compare/v0.3.1...v0.3.2 diff --git a/README.md b/README.md index a6aa001..2c8e836 100644 --- a/README.md +++ b/README.md @@ -16,7 +16,7 @@ -Unit test count +Unit test count From 6b3d1f76d9fe76e3d1aa55a7700d945eff15c39d Mon Sep 17 00:00:00 2001 From: MarvinJWendt Date: Thu, 7 Apr 2022 14:35:38 +0000 Subject: [PATCH 4/4] docs: autoupdate --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 2c8e836..a4f2ad9 100644 --- a/README.md +++ b/README.md @@ -16,7 +16,7 @@ -Unit test count +Unit test count