Skip to content

Commit 5f71ed2

Browse files
authoredJul 28, 2022
Fix typos in gomega_dsl.go (#569)
1 parent 9d1186f commit 5f71ed2

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed
 

‎gomega_dsl.go

+7-7
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ Depending on your vendoring solution you may be inadvertently importing gomega a
3434
// to abstract between the standard package-level function implementations
3535
// and alternatives like *WithT.
3636
//
37-
// The types in the top-level DSL have gotten a bit messy due to earlier depracations that avoid stuttering
37+
// The types in the top-level DSL have gotten a bit messy due to earlier deprecations that avoid stuttering
3838
// and due to an accidental use of a concrete type (*WithT) in an earlier release.
3939
//
4040
// As of 1.15 both the WithT and Ginkgo variants of Gomega are implemented by the same underlying object
@@ -83,7 +83,7 @@ func internalGomega(g Gomega) *internal.Gomega {
8383
return g.(*internal.Gomega)
8484
}
8585

86-
// NewWithT takes a *testing.T and returngs a `gomega.WithT` allowing you to use `Expect`, `Eventually`, and `Consistently` along with
86+
// NewWithT takes a *testing.T and returns a `gomega.WithT` allowing you to use `Expect`, `Eventually`, and `Consistently` along with
8787
// Gomega's rich ecosystem of matchers in standard `testing` test suits.
8888
//
8989
// func TestFarmHasCow(t *testing.T) {
@@ -120,7 +120,7 @@ func RegisterTestingT(t types.GomegaTestingT) {
120120

121121
// InterceptGomegaFailures runs a given callback and returns an array of
122122
// failure messages generated by any Gomega assertions within the callback.
123-
// Exeuction continues after the first failure allowing users to collect all failures
123+
// Execution continues after the first failure allowing users to collect all failures
124124
// in the callback.
125125
//
126126
// This is most useful when testing custom matchers, but can also be used to check
@@ -247,7 +247,7 @@ There are several examples of values that can change over time. These can be pa
247247
248248
will poll the channel repeatedly until it is closed. In this example `Eventually` will block until either the specified timeout of 50ms has elapsed or the channel is closed, whichever comes first.
249249
250-
Several Gomega libraries allow you to use Eventually in this way. For example, the gomega/gexec package allows you to block until a *gexec.Session exits successfuly via:
250+
Several Gomega libraries allow you to use Eventually in this way. For example, the gomega/gexec package allows you to block until a *gexec.Session exits successfully via:
251251
252252
Eventually(session).Should(gexec.Exit(0))
253253
@@ -276,7 +276,7 @@ For example:
276276
277277
will repeatedly poll client.FetchCount until the BeNumerically matcher is satisfied. (Note that this example could have been written as Eventually(client.FetchCount).Should(BeNumerically(">=", 17)))
278278
279-
If multple values are returned by the function, Eventually will pass the first value to the matcher and require that all others are zero-valued. This allows you to pass Eventually a function that returns a value and an error - a common patternin Go.
279+
If multiple values are returned by the function, Eventually will pass the first value to the matcher and require that all others are zero-valued. This allows you to pass Eventually a function that returns a value and an error - a common pattern in Go.
280280
281281
For example, consider a method that returns a value and an error:
282282
func FetchFromDB() (string, error)
@@ -292,7 +292,7 @@ It is important to note that the function passed into Eventually is invoked *syn
292292
293293
When testing complex systems it can be valuable to assert that a _set_ of assertions passes Eventually. Eventually supports this by accepting functions that take a single Gomega argument and return zero or more values.
294294
295-
Here's an example that makes some asssertions and returns a value and error:
295+
Here's an example that makes some assertions and returns a value and error:
296296
297297
Eventually(func(g Gomega) (Widget, error) {
298298
ids, err := client.FetchIDs()
@@ -343,7 +343,7 @@ Consistently, like Eventually, enables making assertions on asynchronous behavio
343343
344344
Consistently blocks when called for a specified duration. During that duration Consistently repeatedly polls its matcher and ensures that it is satisfied. If the matcher is consistently satisfied, then Consistently will pass. Otherwise Consistently will fail.
345345
346-
Both the total waiting duration and the polling interval are configurable as optional arguments. The first optional arugment is the duration that Consistently will run for (defaults to 100ms), and the second argument is the polling interval (defaults to 10ms). As with Eventually, these intervals can be passed in as time.Duration, parsable duration strings or an integer or float number of seconds.
346+
Both the total waiting duration and the polling interval are configurable as optional arguments. The first optional argument is the duration that Consistently will run for (defaults to 100ms), and the second argument is the polling interval (defaults to 10ms). As with Eventually, these intervals can be passed in as time.Duration, parsable duration strings or an integer or float number of seconds.
347347
348348
Consistently accepts the same three categories of actual as Eventually, check the Eventually docs to learn more.
349349

0 commit comments

Comments
 (0)
Please sign in to comment.