Repository: MarvinJWendt/testza
Pull request #148 (2022-04-07 14:34:01)

[BREAKING] Renamed `AssertDirExist` to `AssertDirExists`


Patch:
diff --git a/README.md b/README.md
index b81d5b7..a4f2ad9 100644
--- a/README.md
+++ b/README.md
@@ -16,7 +16,7 @@
 </a>
 
 <a href="https://codecov.io/gh/MarvinJWendt/testza">
-<!-- unittestcount:start --><img src="https://img.shields.io/badge/Unit_Tests-3201-magenta?style=flat-square" alt="Unit test count"><!-- unittestcount:end -->
+<!-- unittestcount:start --><img src="https://img.shields.io/badge/Unit_Tests-3209-magenta?style=flat-square" alt="Unit test count"><!-- unittestcount:end -->
 </a>
   
 <a href="https://pkg.go.dev/github.com/MarvinJWendt/testza" target="_blank">
@@ -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
 
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()
 	}


Test patch:
diff --git a/assert_test.go b/assert_test.go
index 40b701e..363a8bd 100644
--- a/assert_test.go
+++ b/assert_test.go
@@ -1243,7 +1243,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)
 		})
 	}
 }
@@ -1252,7 +1252,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) {