Skip to content

Commit a1d518b

Browse files
authoredJan 2, 2025··
Fix typos (#813)
1 parent bb0e550 commit a1d518b

36 files changed

+175
-171
lines changed
 

‎CHANGELOG.md

+6-6
Original file line numberDiff line numberDiff line change
@@ -322,7 +322,7 @@ Require Go 1.22+
322322

323323
### Features
324324

325-
Introducting [gcustom](https://onsi.github.io/gomega/#gcustom-a-convenient-mechanism-for-buildling-custom-matchers) - a convenient mechanism for building custom matchers.
325+
Introducing [gcustom](https://onsi.github.io/gomega/#gcustom-a-convenient-mechanism-for-buildling-custom-matchers) - a convenient mechanism for building custom matchers.
326326

327327
This is an RC release for `gcustom`. The external API may be tweaked in response to feedback however it is expected to remain mostly stable.
328328

@@ -461,7 +461,7 @@ These improvements are all documented in [Gomega's docs](https://onsi.github.io/
461461
- Fix max number of samples in experiments on non-64-bit systems. (#528) [1c84497]
462462
- Remove dependency on ginkgo v1.16.4 (#530) [4dea8d5]
463463
- Fix for Go 1.18 (#532) [56d2a29]
464-
- Document precendence of timeouts (#533) [b607941]
464+
- Document precedence of timeouts (#533) [b607941]
465465

466466
## 1.18.1
467467

@@ -478,7 +478,7 @@ These improvements are all documented in [Gomega's docs](https://onsi.github.io/
478478
## Fixes
479479
- Gomega now uses ioutil for Go 1.15 and lower (#492) - official support is only for the most recent two major versions of Go but this will unblock users who need to stay on older unsupported versions of Go. [c29c1c0]
480480

481-
## Maintenace
481+
## Maintenance
482482
- Remove Travis workflow (#491) [72e6040]
483483
- Upgrade to Ginkgo 2.0.0 GA [f383637]
484484
- chore: fix description of HaveField matcher (#487) [2b4b2c0]
@@ -726,7 +726,7 @@ Improvements:
726726

727727
- Added `BeSent` which attempts to send a value down a channel and fails if the attempt blocks. Can be paired with `Eventually` to safely send a value down a channel with a timeout.
728728
- `Ω`, `Expect`, `Eventually`, and `Consistently` now immediately `panic` if there is no registered fail handler. This is always a mistake that can hide failing tests.
729-
- `Receive()` no longer errors when passed a closed channel, it's perfectly fine to attempt to read from a closed channel so Ω(c).Should(Receive()) always fails and Ω(c).ShoudlNot(Receive()) always passes with a closed channel.
729+
- `Receive()` no longer errors when passed a closed channel, it's perfectly fine to attempt to read from a closed channel so Ω(c).Should(Receive()) always fails and Ω(c).ShouldNot(Receive()) always passes with a closed channel.
730730
- Added `HavePrefix` and `HaveSuffix` matchers.
731731
- `ghttp` can now handle concurrent requests.
732732
- Added `Succeed` which allows one to write `Ω(MyFunction()).Should(Succeed())`.
@@ -736,7 +736,7 @@ Improvements:
736736
- `ghttp` servers can take an `io.Writer`. `ghttp` will write a line to the writer when each request arrives.
737737
- Added `WithTransform` matcher to allow munging input data before feeding into the relevant matcher
738738
- Added boolean `And`, `Or`, and `Not` matchers to allow creating composite matchers
739-
- Added `gbytes.TimeoutCloser`, `gbytes.TimeoutReader`, and `gbytes.TimeoutWriter` - these are convenience wrappers that timeout if the underlying Closer/Reader/Writer does not return within the alloted time.
739+
- Added `gbytes.TimeoutCloser`, `gbytes.TimeoutReader`, and `gbytes.TimeoutWriter` - these are convenience wrappers that timeout if the underlying Closer/Reader/Writer does not return within the allotted time.
740740
- Added `gbytes.BufferReader` - this constructs a `gbytes.Buffer` that asynchronously reads the passed-in `io.Reader` into its buffer.
741741

742742
Bug Fixes:
@@ -781,7 +781,7 @@ New Matchers:
781781

782782
Updated Matchers:
783783

784-
- `Receive` matcher can take a matcher as an argument and passes only if the channel under test receives an objet that satisfies the passed-in matcher.
784+
- `Receive` matcher can take a matcher as an argument and passes only if the channel under test receives an object that satisfies the passed-in matcher.
785785
- Matchers that implement `MatchMayChangeInTheFuture(actual interface{}) bool` can inform `Eventually` and/or `Consistently` when a match has no chance of changing status in the future. For example, `Receive` returns `false` when a channel is closed.
786786

787787
Misc:

‎docs/index.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -3405,7 +3405,7 @@ Describe("server performance", func() {
34053405
baseline := cache.Load("performance regression test", 1)
34063406
if baseline == nil {
34073407
// this is the first run, let's store a baseline
3408-
cache.Save("performacne regression test", 1, experiment)
3408+
cache.Save("performance regression test", 1, experiment)
34093409
} else {
34103410
for _, m := range []string{"fetching one", "listing"} {
34113411
baselineStats := baseline.GetStats(m)

‎format/format.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ var Indent = " "
5757

5858
var longFormThreshold = 20
5959

60-
// GomegaStringer allows for custom formating of objects for gomega.
60+
// GomegaStringer allows for custom formatting of objects for gomega.
6161
type GomegaStringer interface {
6262
// GomegaString will be used to custom format an object.
6363
// It does not follow UseStringerRepresentation value and will always be called regardless.

‎format/format_test.go

+2-2
Original file line numberDiff line numberDiff line change
@@ -165,13 +165,13 @@ var _ = Describe("Format", func() {
165165
Expect(Message(3, "to be three.")).Should(Equal("Expected\n <int>: 3\nto be three."))
166166
})
167167

168-
It("should print out an indented formatted representation of the value and the message, and trucate it when too long", func() {
168+
It("should print out an indented formatted representation of the value and the message, and truncate it when too long", func() {
169169
tooLong := strings.Repeat("s", MaxLength+1)
170170
tooLongResult := strings.Repeat("s", MaxLength) + "...\n" + truncateHelpText
171171
Expect(Message(tooLong, "to be truncated")).Should(Equal("Expected\n <string>: " + tooLongResult + "\nto be truncated"))
172172
})
173173

174-
It("should print out an indented formatted representation of the value and the message, and not trucate it when MaxLength = 0", func() {
174+
It("should print out an indented formatted representation of the value and the message, and not truncate it when MaxLength = 0", func() {
175175
MaxLength = 0
176176
tooLong := strings.Repeat("s", MaxLength+1)
177177
Expect(Message(tooLong, "to be truncated")).Should(Equal("Expected\n <string>: " + tooLong + "\nto be truncated"))

‎gcustom/make_matcher.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -191,7 +191,7 @@ func (c CustomGomegaMatcher) WithTemplate(templ string, data ...any) CustomGomeg
191191
/*
192192
WithPrecompiledTemplate returns a CustomGomegaMatcher configured to use the passed-in template. The template should be precompiled with gcustom.ParseTemplate().
193193
194-
As with WithTemplate() you can provide a single pice of additional data as an optional argument. This is accessed in the template via {{.Data}}
194+
As with WithTemplate() you can provide a single piece of additional data as an optional argument. This is accessed in the template via {{.Data}}
195195
*/
196196
func (c CustomGomegaMatcher) WithPrecompiledTemplate(templ *template.Template, data ...any) CustomGomegaMatcher {
197197
c.templateMessage = templ
Has a conversation. Original line has a conversation.

‎gexec/session_test.go

+2-2
Original file line numberDiff line numberDiff line change
@@ -330,7 +330,7 @@ var _ = Describe("Session", func() {
330330
errWriter = io.Discard
331331
})
332332

333-
It("executes succesfuly", func() {
333+
It("executes successfully", func() {
334334
Eventually(session).Should(Exit())
335335
})
336336
})
@@ -391,7 +391,7 @@ var _ = Describe("Session", func() {
391391
errWriter = io.Discard
392392
})
393393

394-
It("executes succesfuly", func() {
394+
It("executes successfully", func() {
395395
Eventually(session).Should(Exit())
396396
})
397397
})

‎ghttp/handlers.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -251,7 +251,7 @@ func (g GHTTPWithGomega) RespondWith(statusCode int, body interface{}, optionalH
251251
/*
252252
RespondWithPtr returns a handler that responds to a request with the specified status code and body
253253
254-
Unlike RespondWith, you pass RepondWithPtr a pointer to the status code and body allowing different tests
254+
Unlike RespondWith, you pass RespondWithPtr a pointer to the status code and body allowing different tests
255255
to share the same setup but specify different status codes and bodies.
256256
257257
Also, RespondWithPtr can be given an optional http.Header. The headers defined therein will be added to the response headers.

‎ghttp/test_server_test.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ var _ = Describe("TestServer", func() {
7878
})
7979
})
8080

81-
Describe("closing server mulitple times", func() {
81+
Describe("closing server multiple times", func() {
8282
It("should not fail", func() {
8383
s.Close()
8484
Expect(s.Close).ShouldNot(Panic())

‎gmeasure/cache.go

+37-37
Original file line numberDiff line numberDiff line change
@@ -106,50 +106,50 @@ func (cache ExperimentCache) Clear() error {
106106
}
107107

108108
/*
109-
Load fetches an experiment from the cache. Lookup occurs by name. Load requires that the version numer in the cache is equal to or greater than the passed-in version.
109+
Load fetches an experiment from the cache. Lookup occurs by name. Load requires that the version number in the cache is equal to or greater than the passed-in version.
110110
111111
If an experiment with corresponding name and version >= the passed-in version is found, it is unmarshaled and returned.
112112
113113
If no experiment is found, or the cached version is smaller than the passed-in version, Load will return nil.
114114
115115
When paired with Ginkgo you can cache experiments and prevent potentially expensive recomputation with this pattern:
116116
117-
const EXPERIMENT_VERSION = 1 //bump this to bust the cache and recompute _all_ experiments
118-
119-
Describe("some experiments", func() {
120-
var cache gmeasure.ExperimentCache
121-
var experiment *gmeasure.Experiment
122-
123-
BeforeEach(func() {
124-
cache = gmeasure.NewExperimentCache("./gmeasure-cache")
125-
name := CurrentSpecReport().LeafNodeText
126-
experiment = cache.Load(name, EXPERIMENT_VERSION)
127-
if experiment != nil {
128-
AddReportEntry(experiment)
129-
Skip("cached")
130-
}
131-
experiment = gmeasure.NewExperiment(name)
132-
AddReportEntry(experiment)
133-
})
134-
135-
It("foo runtime", func() {
136-
experiment.SampleDuration("runtime", func() {
137-
//do stuff
138-
}, gmeasure.SamplingConfig{N:100})
139-
})
140-
141-
It("bar runtime", func() {
142-
experiment.SampleDuration("runtime", func() {
143-
//do stuff
144-
}, gmeasure.SamplingConfig{N:100})
145-
})
146-
147-
AfterEach(func() {
148-
if !CurrentSpecReport().State.Is(types.SpecStateSkipped) {
149-
cache.Save(experiment.Name, EXPERIMENT_VERSION, experiment)
150-
}
151-
})
152-
})
117+
const EXPERIMENT_VERSION = 1 //bump this to bust the cache and recompute _all_ experiments
118+
119+
Describe("some experiments", func() {
120+
var cache gmeasure.ExperimentCache
121+
var experiment *gmeasure.Experiment
122+
123+
BeforeEach(func() {
124+
cache = gmeasure.NewExperimentCache("./gmeasure-cache")
125+
name := CurrentSpecReport().LeafNodeText
126+
experiment = cache.Load(name, EXPERIMENT_VERSION)
127+
if experiment != nil {
128+
AddReportEntry(experiment)
129+
Skip("cached")
130+
}
131+
experiment = gmeasure.NewExperiment(name)
132+
AddReportEntry(experiment)
133+
})
134+
135+
It("foo runtime", func() {
136+
experiment.SampleDuration("runtime", func() {
137+
//do stuff
138+
}, gmeasure.SamplingConfig{N:100})
139+
})
140+
141+
It("bar runtime", func() {
142+
experiment.SampleDuration("runtime", func() {
143+
//do stuff
144+
}, gmeasure.SamplingConfig{N:100})
145+
})
146+
147+
AfterEach(func() {
148+
if !CurrentSpecReport().State.Is(types.SpecStateSkipped) {
149+
cache.Save(experiment.Name, EXPERIMENT_VERSION, experiment)
150+
}
151+
})
152+
})
153153
*/
154154
func (cache ExperimentCache) Load(name string, version int) *Experiment {
155155
path := filepath.Join(cache.Path, cache.hashOf(name)+CACHE_EXT)

‎gmeasure/cache_test.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ var _ = Describe("Cache", func() {
7777
Ω(cache.Clear()).Should(Succeed())
7878
})
7979

80-
It("returs nil when loading a non-existing experiment", func() {
80+
It("returns nil when loading a non-existing experiment", func() {
8181
Ω(cache.Load("floop", 17)).Should(BeNil())
8282
})
8383
})

‎gmeasure/experiment.go

+19-19
Original file line numberDiff line numberDiff line change
@@ -22,9 +22,9 @@ Once measurements are complete, an Experiment can generate a comprehensive repor
2222
2323
Users can also access and analyze the resulting Measurements directly. Use Experiment.Get(NAME) to fetch the Measurement named NAME. This returned struct will have fields containing
2424
all the data points and annotations recorded by the experiment. You can subsequently fetch the Measurement.Stats() to get a Stats struct that contains basic statistical information about the
25-
Measurement (min, max, median, mean, standard deviation). You can order these Stats objects using RankStats() to identify best/worst performers across multpile experiments or measurements.
25+
Measurement (min, max, median, mean, standard deviation). You can order these Stats objects using RankStats() to identify best/worst performers across multiple experiments or measurements.
2626
27-
gmeasure also supports caching Experiments via an ExperimentCache. The cache supports storing and retreiving experiments by name and version. This allows you to rerun code without
27+
gmeasure also supports caching Experiments via an ExperimentCache. The cache supports storing and retrieving experiments by name and version. This allows you to rerun code without
2828
repeating expensive experiments that may not have changed (which can be controlled by the cache version number). It also enables you to compare new experiment runs with older runs to detect
2929
variations in performance/behavior.
3030
@@ -66,8 +66,8 @@ type SamplingConfig struct {
6666

6767
// The Units decorator allows you to specify units (an arbitrary string) when recording values. It is ignored when recording durations.
6868
//
69-
// e := gmeasure.NewExperiment("My Experiment")
70-
// e.RecordValue("length", 3.141, gmeasure.Units("inches"))
69+
// e := gmeasure.NewExperiment("My Experiment")
70+
// e.RecordValue("length", 3.141, gmeasure.Units("inches"))
7171
//
7272
// Units are only set the first time a value of a given name is recorded. In the example above any subsequent calls to e.RecordValue("length", X) will maintain the "inches" units even if a new set of Units("UNIT") are passed in later.
7373
type Units string
@@ -76,9 +76,9 @@ type Units string
7676
//
7777
// For example:
7878
//
79-
// e := gmeasure.NewExperiment("My Experiment")
80-
// e.RecordValue("length", 3.141, gmeasure.Annotation("bob"))
81-
// e.RecordValue("length", 2.71, gmeasure.Annotation("jane"))
79+
// e := gmeasure.NewExperiment("My Experiment")
80+
// e.RecordValue("length", 3.141, gmeasure.Annotation("bob"))
81+
// e.RecordValue("length", 2.71, gmeasure.Annotation("jane"))
8282
//
8383
// ...will result in a Measurement named "length" that records two values )[3.141, 2.71]) annotation with (["bob", "jane"])
8484
type Annotation string
@@ -88,11 +88,11 @@ type Annotation string
8888
//
8989
// For example:
9090
//
91-
// e := gmeasure.NewExperiment("My Experiment")
92-
// e.RecordValue("length", 3.141, gmeasure.Style("{{blue}}{{bold}}"))
93-
// e.RecordValue("length", 2.71)
94-
// e.RecordDuration("cooking time", 3 * time.Second, gmeasure.Style("{{red}}{{underline}}"))
95-
// e.RecordDuration("cooking time", 2 * time.Second)
91+
// e := gmeasure.NewExperiment("My Experiment")
92+
// e.RecordValue("length", 3.141, gmeasure.Style("{{blue}}{{bold}}"))
93+
// e.RecordValue("length", 2.71)
94+
// e.RecordDuration("cooking time", 3 * time.Second, gmeasure.Style("{{red}}{{underline}}"))
95+
// e.RecordDuration("cooking time", 2 * time.Second)
9696
//
9797
// will emit a report with blue bold entries for the length measurement and red underlined entries for the cooking time measurement.
9898
//
@@ -112,11 +112,11 @@ type PrecisionBundle struct {
112112
//
113113
// For example:
114114
//
115-
// e := gmeasure.NewExperiment("My Experiment")
116-
// e.RecordValue("length", 3.141, gmeasure.Precision(2))
117-
// e.RecordValue("length", 2.71)
118-
// e.RecordDuration("cooking time", 3214 * time.Millisecond, gmeasure.Precision(100*time.Millisecond))
119-
// e.RecordDuration("cooking time", 2623 * time.Millisecond)
115+
// e := gmeasure.NewExperiment("My Experiment")
116+
// e.RecordValue("length", 3.141, gmeasure.Precision(2))
117+
// e.RecordValue("length", 2.71)
118+
// e.RecordDuration("cooking time", 3214 * time.Millisecond, gmeasure.Precision(100*time.Millisecond))
119+
// e.RecordDuration("cooking time", 2623 * time.Millisecond)
120120
func Precision(p interface{}) PrecisionBundle {
121121
out := DefaultPrecisionBundle
122122
switch reflect.TypeOf(p) {
@@ -308,7 +308,7 @@ The resulting durations are recorded on a Duration Measurement with the passed-i
308308
309309
The callback is given a zero-based index that increments by one between samples. The callback must return an Annotation - this annotation is attached to the measured duration.
310310
311-
The Sampling is configured via the passed-in SamplingConfig
311+
# The Sampling is configured via the passed-in SamplingConfig
312312
313313
SampleAnnotatedDuration supports the Style() and Precision() decorations.
314314
*/
@@ -395,7 +395,7 @@ SampleAnnotatedValue samples the passed-in callback and records the return value
395395
396396
The callback is given a zero-based index that increments by one between samples. The callback must return a float64 and an Annotation - the annotation is attached to the recorded value.
397397
398-
The Sampling is configured via the passed-in SamplingConfig
398+
# The Sampling is configured via the passed-in SamplingConfig
399399
400400
SampleValue supports the Style(), Units(), and Precision() decorations.
401401
*/

‎gmeasure/experiment_test.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -298,7 +298,7 @@ var _ = Describe("Experiment", func() {
298298
}).Should(PanicWith("invalid precision type, must be time.Duration or int"))
299299
})
300300

301-
It("panics if an unrecognized argumnet is passed in", func() {
301+
It("panics if an unrecognized argument is passed in", func() {
302302
Ω(func() {
303303
e.RecordValue("sprockets", 2, "boom")
304304
}).Should(PanicWith(`unrecognized argument "boom"`))

‎gmeasure/rank.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ func (s *RankingCriteria) UnmarshalJSON(b []byte) error {
3434
func (s RankingCriteria) MarshalJSON() ([]byte, error) { return rcEnumSupport.MarshJSON(uint(s)) }
3535

3636
/*
37-
Ranking ranks a set of Stats by a specified RankingCritera. Use RankStats to create a Ranking.
37+
Ranking ranks a set of Stats by a specified RankingCriteria. Use RankStats to create a Ranking.
3838
3939
When using Ginkgo, you can register Rankings as Report Entries via AddReportEntry. This will emit a formatted table representing the Stats in rank-order when Ginkgo generates the report.
4040
*/

‎gmeasure/stats.go

+3-3
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ type Stats struct {
7575
// If Type is StatTypeValue then PrecisionBundle.ValueFormat is used to format any values before presentation
7676
PrecisionBundle PrecisionBundle
7777

78-
// N represents the total number of data points in the Meassurement from which this Stat is derived
78+
// N represents the total number of data points in the Measurement from which this Stat is derived
7979
N int
8080

8181
// If Type is StatTypeValue, ValueBundle will be populated with float64s representing this Stat's statistics
@@ -97,7 +97,7 @@ func (s Stats) String() string {
9797
// ValueFor returns the float64 value for a particular Stat. You should only use this if the Stats has Type StatsTypeValue
9898
// For example:
9999
//
100-
// median := experiment.GetStats("length").ValueFor(gmeasure.StatMedian)
100+
// median := experiment.GetStats("length").ValueFor(gmeasure.StatMedian)
101101
//
102102
// will return the median data point for the "length" Measurement.
103103
func (s Stats) ValueFor(stat Stat) float64 {
@@ -107,7 +107,7 @@ func (s Stats) ValueFor(stat Stat) float64 {
107107
// DurationFor returns the time.Duration for a particular Stat. You should only use this if the Stats has Type StatsTypeDuration
108108
// For example:
109109
//
110-
// mean := experiment.GetStats("runtime").ValueFor(gmeasure.StatMean)
110+
// mean := experiment.GetStats("runtime").ValueFor(gmeasure.StatMean)
111111
//
112112
// will return the mean duration for the "runtime" Measurement.
113113
func (s Stats) DurationFor(stat Stat) time.Duration {

‎gomega_dsl.go

+4-4
Original file line numberDiff line numberDiff line change
@@ -319,19 +319,19 @@ you an also use Eventually().WithContext(ctx) to pass in the context. Passed-in
319319
Eventually(client.FetchCount).WithContext(ctx).WithArguments("/users").Should(BeNumerically(">=", 17))
320320
}, SpecTimeout(time.Second))
321321
322-
Either way the context pasesd to Eventually is also passed to the underlying function. Now, when Ginkgo cancels the context both the FetchCount client and Gomega will be informed and can exit.
322+
Either way the context passed to Eventually is also passed to the underlying function. Now, when Ginkgo cancels the context both the FetchCount client and Gomega will be informed and can exit.
323323
324324
By default, when a context is passed to Eventually *without* an explicit timeout, Gomega will rely solely on the context's cancellation to determine when to stop polling. If you want to specify a timeout in addition to the context you can do so using the .WithTimeout() method. For example:
325325
326326
Eventually(client.FetchCount).WithContext(ctx).WithTimeout(10*time.Second).Should(BeNumerically(">=", 17))
327327
328-
now either the context cacnellation or the timeout will cause Eventually to stop polling.
328+
now either the context cancellation or the timeout will cause Eventually to stop polling.
329329
330330
If, instead, you would like to opt out of this behavior and have Gomega's default timeouts govern Eventuallys that take a context you can call:
331331
332332
EnforceDefaultTimeoutsWhenUsingContexts()
333333
334-
in the DSL (or on a Gomega instance). Now all calls to Eventually that take a context will fail if eitehr the context is cancelled or the default timeout elapses.
334+
in the DSL (or on a Gomega instance). Now all calls to Eventually that take a context will fail if either the context is cancelled or the default timeout elapses.
335335
336336
**Category 3: Making assertions _in_ the function passed into Eventually**
337337
@@ -441,7 +441,7 @@ func ConsistentlyWithOffset(offset int, actualOrCtx interface{}, args ...interfa
441441
}
442442

443443
/*
444-
StopTrying can be used to signal to Eventually and Consistentlythat they should abort and stop trying. This always results in a failure of the assertion - and the failure message is the content of the StopTrying signal.
444+
StopTrying can be used to signal to Eventually and Consistently that they should abort and stop trying. This always results in a failure of the assertion - and the failure message is the content of the StopTrying signal.
445445
446446
You can send the StopTrying signal by either returning StopTrying("message") as an error from your passed-in function _or_ by calling StopTrying("message").Now() to trigger a panic and end execution.
447447

‎gstruct/elements.go

+55-51
Original file line numberDiff line numberDiff line change
@@ -14,56 +14,59 @@ import (
1414
"github.com/onsi/gomega/types"
1515
)
1616

17-
//MatchAllElements succeeds if every element of a slice matches the element matcher it maps to
18-
//through the id function, and every element matcher is matched.
19-
// idFn := func(element interface{}) string {
20-
// return fmt.Sprintf("%v", element)
21-
// }
17+
// MatchAllElements succeeds if every element of a slice matches the element matcher it maps to
18+
// through the id function, and every element matcher is matched.
2219
//
23-
// Expect([]string{"a", "b"}).To(MatchAllElements(idFn, Elements{
24-
// "a": Equal("a"),
25-
// "b": Equal("b"),
26-
// }))
20+
// idFn := func(element interface{}) string {
21+
// return fmt.Sprintf("%v", element)
22+
// }
23+
//
24+
// Expect([]string{"a", "b"}).To(MatchAllElements(idFn, Elements{
25+
// "a": Equal("a"),
26+
// "b": Equal("b"),
27+
// }))
2728
func MatchAllElements(identifier Identifier, elements Elements) types.GomegaMatcher {
2829
return &ElementsMatcher{
2930
Identifier: identifier,
3031
Elements: elements,
3132
}
3233
}
3334

34-
//MatchAllElementsWithIndex succeeds if every element of a slice matches the element matcher it maps to
35-
//through the id with index function, and every element matcher is matched.
36-
// idFn := func(index int, element interface{}) string {
37-
// return strconv.Itoa(index)
38-
// }
35+
// MatchAllElementsWithIndex succeeds if every element of a slice matches the element matcher it maps to
36+
// through the id with index function, and every element matcher is matched.
37+
//
38+
// idFn := func(index int, element interface{}) string {
39+
// return strconv.Itoa(index)
40+
// }
3941
//
40-
// Expect([]string{"a", "b"}).To(MatchAllElements(idFn, Elements{
41-
// "0": Equal("a"),
42-
// "1": Equal("b"),
43-
// }))
42+
// Expect([]string{"a", "b"}).To(MatchAllElements(idFn, Elements{
43+
// "0": Equal("a"),
44+
// "1": Equal("b"),
45+
// }))
4446
func MatchAllElementsWithIndex(identifier IdentifierWithIndex, elements Elements) types.GomegaMatcher {
4547
return &ElementsMatcher{
4648
Identifier: identifier,
4749
Elements: elements,
4850
}
4951
}
5052

51-
//MatchElements succeeds if each element of a slice matches the element matcher it maps to
52-
//through the id function. It can ignore extra elements and/or missing elements.
53-
// idFn := func(element interface{}) string {
54-
// return fmt.Sprintf("%v", element)
55-
// }
53+
// MatchElements succeeds if each element of a slice matches the element matcher it maps to
54+
// through the id function. It can ignore extra elements and/or missing elements.
5655
//
57-
// Expect([]string{"a", "b", "c"}).To(MatchElements(idFn, IgnoreExtras, Elements{
58-
// "a": Equal("a"),
59-
// "b": Equal("b"),
60-
// }))
61-
// Expect([]string{"a", "c"}).To(MatchElements(idFn, IgnoreMissing, Elements{
62-
// "a": Equal("a"),
63-
// "b": Equal("b"),
64-
// "c": Equal("c"),
65-
// "d": Equal("d"),
66-
// }))
56+
// idFn := func(element interface{}) string {
57+
// return fmt.Sprintf("%v", element)
58+
// }
59+
//
60+
// Expect([]string{"a", "b", "c"}).To(MatchElements(idFn, IgnoreExtras, Elements{
61+
// "a": Equal("a"),
62+
// "b": Equal("b"),
63+
// }))
64+
// Expect([]string{"a", "c"}).To(MatchElements(idFn, IgnoreMissing, Elements{
65+
// "a": Equal("a"),
66+
// "b": Equal("b"),
67+
// "c": Equal("c"),
68+
// "d": Equal("d"),
69+
// }))
6770
func MatchElements(identifier Identifier, options Options, elements Elements) types.GomegaMatcher {
6871
return &ElementsMatcher{
6972
Identifier: identifier,
@@ -74,22 +77,23 @@ func MatchElements(identifier Identifier, options Options, elements Elements) ty
7477
}
7578
}
7679

77-
//MatchElementsWithIndex succeeds if each element of a slice matches the element matcher it maps to
78-
//through the id with index function. It can ignore extra elements and/or missing elements.
79-
// idFn := func(index int, element interface{}) string {
80-
// return strconv.Itoa(index)
81-
// }
80+
// MatchElementsWithIndex succeeds if each element of a slice matches the element matcher it maps to
81+
// through the id with index function. It can ignore extra elements and/or missing elements.
82+
//
83+
// idFn := func(index int, element interface{}) string {
84+
// return strconv.Itoa(index)
85+
// }
8286
//
83-
// Expect([]string{"a", "b", "c"}).To(MatchElements(idFn, IgnoreExtras, Elements{
84-
// "0": Equal("a"),
85-
// "1": Equal("b"),
86-
// }))
87-
// Expect([]string{"a", "c"}).To(MatchElements(idFn, IgnoreMissing, Elements{
88-
// "0": Equal("a"),
89-
// "1": Equal("b"),
90-
// "2": Equal("c"),
91-
// "3": Equal("d"),
92-
// }))
87+
// Expect([]string{"a", "b", "c"}).To(MatchElements(idFn, IgnoreExtras, Elements{
88+
// "0": Equal("a"),
89+
// "1": Equal("b"),
90+
// }))
91+
// Expect([]string{"a", "c"}).To(MatchElements(idFn, IgnoreMissing, Elements{
92+
// "0": Equal("a"),
93+
// "1": Equal("b"),
94+
// "2": Equal("c"),
95+
// "3": Equal("d"),
96+
// }))
9397
func MatchElementsWithIndex(identifier IdentifierWithIndex, options Options, elements Elements) types.GomegaMatcher {
9498
return &ElementsMatcher{
9599
Identifier: identifier,
@@ -126,7 +130,7 @@ type Elements map[string]types.GomegaMatcher
126130
// Function for identifying (mapping) elements.
127131
type Identifier func(element interface{}) string
128132

129-
// Calls the underlying fucntion with the provided params.
133+
// Calls the underlying function with the provided params.
130134
// Identifier drops the index.
131135
func (i Identifier) WithIndexAndElement(index int, element interface{}) string {
132136
return i(element)
@@ -135,13 +139,13 @@ func (i Identifier) WithIndexAndElement(index int, element interface{}) string {
135139
// Uses the index and element to generate an element name
136140
type IdentifierWithIndex func(index int, element interface{}) string
137141

138-
// Calls the underlying fucntion with the provided params.
142+
// Calls the underlying function with the provided params.
139143
// IdentifierWithIndex uses the index.
140144
func (i IdentifierWithIndex) WithIndexAndElement(index int, element interface{}) string {
141145
return i(index, element)
142146
}
143147

144-
// Interface for identifing the element
148+
// Interface for identifying the element
145149
type Identify interface {
146150
WithIndexAndElement(i int, element interface{}) string
147151
}

‎gstruct/types.go

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
package gstruct
22

3-
//Options is the type for options passed to some matchers.
3+
// Options is the type for options passed to some matchers.
44
type Options int
55

66
const (
@@ -9,7 +9,7 @@ const (
99
//IgnoreMissing tells the matcher to ignore missing elements or fields, rather than triggering a failure.
1010
IgnoreMissing
1111
//AllowDuplicates tells the matcher to permit multiple members of the slice to produce the same ID when
12-
//considered by the indentifier function. All members that map to a given key must still match successfully
12+
//considered by the identifier function. All members that map to a given key must still match successfully
1313
//with the matcher that is provided for that key.
1414
AllowDuplicates
1515
)

‎internal/async_assertion.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -224,7 +224,7 @@ func (assertion *AsyncAssertion) argumentMismatchError(t reflect.Type, numProvid
224224
if numProvided == 1 {
225225
have = "has"
226226
}
227-
return fmt.Errorf(`The function passed to %s has signature %s takes %d arguments but %d %s been provided. Please use %s().WithArguments() to pass the corect set of arguments.
227+
return fmt.Errorf(`The function passed to %s has signature %s takes %d arguments but %d %s been provided. Please use %s().WithArguments() to pass the correct set of arguments.
228228
229229
You can learn more at https://onsi.github.io/gomega/#eventually
230230
`, assertion.asyncType, t, t.NumIn(), numProvided, have, assertion.asyncType)

‎internal/async_assertion_test.go

+11-11
Original file line numberDiff line numberDiff line change
@@ -803,7 +803,7 @@ var _ = Describe("Asynchronous Assertions", func() {
803803
Ω(ig.FailureMessage).Should(ContainSubstring("Expected\n <bool>: false\nto be true"))
804804
})
805805

806-
It("shows the state of the last match if there was a non-failing funciton at some point", func() {
806+
It("shows the state of the last match if there was a non-failing function at some point", func() {
807807
counter := 0
808808
_, file, line, _ := runtime.Caller(0)
809809
ig.G.Eventually(func(g Gomega) int {
@@ -917,7 +917,7 @@ var _ = Describe("Asynchronous Assertions", func() {
917917
Ω(ig.FailureMessage).ShouldNot(ContainSubstring("bloop"))
918918
})
919919

920-
It("returns the first failed assertion as an error and should satisy ShouldNot(Succeed) eventually", func() {
920+
It("returns the first failed assertion as an error and should satisfy ShouldNot(Succeed) eventually", func() {
921921
counter := 0
922922
ig.G.Eventually(func(g Gomega) {
923923
counter += 1
@@ -967,7 +967,7 @@ var _ = Describe("Asynchronous Assertions", func() {
967967
Ω(counter).Should(Equal(3))
968968
})
969969

970-
It("returns the first failed assertion as an error and should satisy ShouldNot(Succeed) consistently if an error always occur", func() {
970+
It("returns the first failed assertion as an error and should satisfy ShouldNot(Succeed) consistently if an error always occur", func() {
971971
counter := 0
972972
ig.G.Consistently(func(g Gomega) {
973973
counter += 1
@@ -1033,7 +1033,7 @@ var _ = Describe("Asynchronous Assertions", func() {
10331033
})
10341034
})
10351035

1036-
Context("with a Gomega arugment as well", func() {
1036+
Context("with a Gomega argument as well", func() {
10371037
It("can also forward arguments alongside a Gomega", func() {
10381038
Eventually(func(g Gomega, a int, b int) {
10391039
g.Expect(a).To(Equal(b))
@@ -1044,7 +1044,7 @@ var _ = Describe("Asynchronous Assertions", func() {
10441044
})
10451045
})
10461046

1047-
Context("with a context arugment as well", func() {
1047+
Context("with a context argument as well", func() {
10481048
It("can also forward arguments alongside a context", func() {
10491049
ctx := context.WithValue(context.Background(), "key", "value")
10501050
Eventually(func(ctx context.Context, animal string) string {
@@ -1053,7 +1053,7 @@ var _ = Describe("Asynchronous Assertions", func() {
10531053
})
10541054
})
10551055

1056-
Context("with Gomega and context arugments", func() {
1056+
Context("with Gomega and context arguments", func() {
10571057
It("forwards arguments alongside both", func() {
10581058
ctx := context.WithValue(context.Background(), "key", "I have")
10591059
f := func(g Gomega, ctx context.Context, count int, zoo ...string) {
@@ -1082,27 +1082,27 @@ var _ = Describe("Asynchronous Assertions", func() {
10821082
ig.G.Eventually(func(a int) string {
10831083
return ""
10841084
}).Should(Equal("foo"))
1085-
Ω(ig.FailureMessage).Should(ContainSubstring("The function passed to Eventually has signature func(int) string takes 1 arguments but 0 have been provided. Please use Eventually().WithArguments() to pass the corect set of arguments."))
1085+
Ω(ig.FailureMessage).Should(ContainSubstring("The function passed to Eventually has signature func(int) string takes 1 arguments but 0 have been provided. Please use Eventually().WithArguments() to pass the correct set of arguments."))
10861086

10871087
ig.G.Eventually(func(a int, b int) string {
10881088
return ""
10891089
}).WithArguments(1).Should(Equal("foo"))
1090-
Ω(ig.FailureMessage).Should(ContainSubstring("The function passed to Eventually has signature func(int, int) string takes 2 arguments but 1 has been provided. Please use Eventually().WithArguments() to pass the corect set of arguments."))
1090+
Ω(ig.FailureMessage).Should(ContainSubstring("The function passed to Eventually has signature func(int, int) string takes 2 arguments but 1 has been provided. Please use Eventually().WithArguments() to pass the correct set of arguments."))
10911091

10921092
ig.G.Eventually(func(a int, b int) string {
10931093
return ""
10941094
}).WithArguments(1, 2, 3).Should(Equal("foo"))
1095-
Ω(ig.FailureMessage).Should(ContainSubstring("The function passed to Eventually has signature func(int, int) string takes 2 arguments but 3 have been provided. Please use Eventually().WithArguments() to pass the corect set of arguments."))
1095+
Ω(ig.FailureMessage).Should(ContainSubstring("The function passed to Eventually has signature func(int, int) string takes 2 arguments but 3 have been provided. Please use Eventually().WithArguments() to pass the correct set of arguments."))
10961096

10971097
ig.G.Eventually(func(g Gomega, a int, b int) string {
10981098
return ""
10991099
}).WithArguments(1, 2, 3).Should(Equal("foo"))
1100-
Ω(ig.FailureMessage).Should(ContainSubstring("The function passed to Eventually has signature func(types.Gomega, int, int) string takes 3 arguments but 4 have been provided. Please use Eventually().WithArguments() to pass the corect set of arguments."))
1100+
Ω(ig.FailureMessage).Should(ContainSubstring("The function passed to Eventually has signature func(types.Gomega, int, int) string takes 3 arguments but 4 have been provided. Please use Eventually().WithArguments() to pass the correct set of arguments."))
11011101

11021102
ig.G.Eventually(func(a int, b int, c ...int) string {
11031103
return ""
11041104
}).WithArguments(1).Should(Equal("foo"))
1105-
Ω(ig.FailureMessage).Should(ContainSubstring("The function passed to Eventually has signature func(int, int, ...int) string takes 3 arguments but 1 has been provided. Please use Eventually().WithArguments() to pass the corect set of arguments."))
1105+
Ω(ig.FailureMessage).Should(ContainSubstring("The function passed to Eventually has signature func(int, int, ...int) string takes 3 arguments but 1 has been provided. Please use Eventually().WithArguments() to pass the correct set of arguments."))
11061106

11071107
})
11081108
})

‎internal/gomega.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ func (g *Gomega) makeAsyncAssertion(asyncAssertionType AsyncAssertionType, offse
7878
actual := actualOrCtx
7979
startingIndex := 0
8080
if _, isCtx := actualOrCtx.(context.Context); isCtx && len(args) > 0 {
81-
// the first argument is a context, we should accept it as the context _only if_ it is **not** the only argumnent **and** the second argument is not a parseable duration
81+
// the first argument is a context, we should accept it as the context _only if_ it is **not** the only argument **and** the second argument is not a parseable duration
8282
// this is due to an unfortunate ambiguity in early version of Gomega in which multi-type durations are allowed after the actual
8383
if _, err := toDuration(args[0]); err != nil {
8484
ctx = actualOrCtx.(context.Context)

‎internal/internal_suite_test.go

+2-2
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ func (matcher SpecMatcher) Match(actual interface{}) (bool, error) {
6060
case ERR_MATCH:
6161
return false, TEST_MATCHER_ERR
6262
}
63-
return false, fmt.Errorf("unkown actual %v", actual)
63+
return false, fmt.Errorf("unknown actual %v", actual)
6464
}
6565

6666
func (matcher SpecMatcher) FailureMessage(actual interface{}) string {
@@ -75,7 +75,7 @@ func SpecMatch() SpecMatcher {
7575
return SpecMatcher{}
7676
}
7777

78-
//FakeGomegaTestingT
78+
// FakeGomegaTestingT
7979
type FakeGomegaTestingT struct {
8080
CalledHelper bool
8181
CalledFatalf string

‎matchers.go

+3-3
Original file line numberDiff line numberDiff line change
@@ -202,7 +202,7 @@ func BeClosed() types.GomegaMatcher {
202202
// Expect(myThing.IsValid()).Should(BeTrue())
203203
//
204204
// Finally, if you want to match the received object as well as get the actual received value into a variable, so you can reason further about the value received,
205-
// you can pass a pointer to a variable of the approriate type first, and second a matcher:
205+
// you can pass a pointer to a variable of the appropriate type first, and second a matcher:
206206
//
207207
// var myThing thing
208208
// Eventually(thingChan).Should(Receive(&myThing, ContainSubstring("bar")))
@@ -395,7 +395,7 @@ func ConsistOf(elements ...interface{}) types.GomegaMatcher {
395395
}
396396
}
397397

398-
// HaveExactElements succeeds if actual contains elements that precisely match the elemets passed into the matcher. The ordering of the elements does matter.
398+
// HaveExactElements succeeds if actual contains elements that precisely match the elements passed into the matcher. The ordering of the elements does matter.
399399
// By default HaveExactElements() uses Equal() to match the elements, however custom matchers can be passed in instead. Here are some examples:
400400
//
401401
// Expect([]string{"Foo", "FooBar"}).Should(HaveExactElements("Foo", "FooBar"))
@@ -692,7 +692,7 @@ func WithTransform(transform interface{}, matcher types.GomegaMatcher) types.Gom
692692
}
693693

694694
// Satisfy matches the actual value against the `predicate` function.
695-
// The given predicate must be a function of one paramter that returns bool.
695+
// The given predicate must be a function of one parameter that returns bool.
696696
//
697697
// var isEven = func(i int) bool { return i%2 == 0 }
698698
// Expect(2).To(Satisfy(isEven))

‎matchers/be_comparable_to_matcher_test.go

+2-2
Original file line numberDiff line numberDiff line change
@@ -145,8 +145,8 @@ var _ = Describe("BeComparableTo", func() {
145145

146146
Expect(matcherWithEqual.FailureMessage(actual)).To(BeEquivalentTo("Expected object to be comparable, diff: "))
147147

148-
expectedDiffernt := structWithUnexportedFields{unexported: "xxx", Exported: "other value"}
149-
matcherWithDifference := BeComparableTo(expectedDiffernt, cmpopts.IgnoreUnexported(structWithUnexportedFields{}))
148+
expectedDifferent := structWithUnexportedFields{unexported: "xxx", Exported: "other value"}
149+
matcherWithDifference := BeComparableTo(expectedDifferent, cmpopts.IgnoreUnexported(structWithUnexportedFields{}))
150150
Expect(matcherWithDifference.FailureMessage(actual)).To(ContainSubstring("1 ignored field"))
151151
Expect(matcherWithDifference.FailureMessage(actual)).To(ContainSubstring("Exported: \"other value\""))
152152
Expect(matcherWithDifference.FailureMessage(actual)).To(ContainSubstring("Exported: \"exported field value\""))

‎matchers/be_identical_to_test.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ var _ = Describe("BeIdenticalTo", func() {
3030
Expect(5).ShouldNot(BeIdenticalTo(3))
3131
})
3232

33-
It("should treat primtives as identical", func() {
33+
It("should treat primitives as identical", func() {
3434
Expect("5").Should(BeIdenticalTo("5"))
3535
Expect("5").ShouldNot(BeIdenticalTo("55"))
3636

‎matchers/be_numerically_matcher_test.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,7 @@ var _ = Describe("BeNumerically", func() {
120120
})
121121

122122
Context("and there is a precision parameter", func() {
123-
It("should use precision paramter", func() {
123+
It("should use precision parameter", func() {
124124
Expect(5).Should(BeNumerically("~", 6, 2))
125125
Expect(5).ShouldNot(BeNumerically("~", 8, 2))
126126
Expect(uint(5)).Should(BeNumerically("~", 6, 1))

‎matchers/be_temporally_matcher_test.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ var _ = Describe("BeTemporally", func() {
6767
BeforeEach(func() {
6868
t2 = t0.Add(3 * time.Second)
6969
})
70-
It("should use precision paramter", func() {
70+
It("should use precision parameter", func() {
7171
d := 2 * time.Second
7272
Expect(t0).Should(BeTemporally("~", t0, d))
7373
Expect(t0).Should(BeTemporally("~", t1, d))

‎matchers/contain_element_matcher.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -251,7 +251,7 @@ func (matcher *ContainElementMatcher) Match(actual interface{}) (success bool, e
251251
}
252252

253253
// pick up any findings the test is interested in as it specified a non-nil
254-
// result reference. However, the expection always is that there are at
254+
// result reference. However, the expectation always is that there are at
255255
// least one or multiple findings. So, if a result is expected, but we had
256256
// no findings, then this is an error.
257257
findings := getFindings()

‎matchers/contain_element_matcher_test.go

+2-2
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ var _ = Describe("ContainElement", func() {
5252
})
5353

5454
When("passed a correctly typed nil", func() {
55-
It("should operate succesfully on the passed in value", func() {
55+
It("should operate successfully on the passed in value", func() {
5656
var nilSlice []int
5757
Expect(nilSlice).ShouldNot(ContainElement(1))
5858

@@ -309,7 +309,7 @@ var _ = Describe("ContainElement", func() {
309309
})
310310

311311
When("passed a correctly typed nil", func() {
312-
It("should operate succesfully on the passed in value", func() {
312+
It("should operate successfully on the passed in value", func() {
313313
var nilIter func(func(string) bool)
314314
Expect(nilIter).ShouldNot(ContainElement(1))
315315

‎matchers/contain_substring_matcher_test.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ var _ = Describe("ContainSubstringMatcher", func() {
2121
})
2222

2323
When("actual is a stringer", func() {
24-
It("should call the stringer and match agains the returned string", func() {
24+
It("should call the stringer and match against the returned string", func() {
2525
Expect(&myStringer{a: "Abc3"}).Should(ContainSubstring("bc3"))
2626
})
2727
})

‎matchers/have_cap_matcher_test.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ var _ = Describe("HaveCap", func() {
2727
})
2828

2929
When("passed a correctly typed nil", func() {
30-
It("should operate succesfully on the passed in value", func() {
30+
It("should operate successfully on the passed in value", func() {
3131
var nilSlice []int
3232
Expect(nilSlice).Should(HaveCap(0))
3333

‎matchers/have_key_matcher_test.go

+2-2
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ var _ = Describe("HaveKey", func() {
4040
})
4141

4242
When("passed a correctly typed nil", func() {
43-
It("should operate succesfully on the passed in value", func() {
43+
It("should operate successfully on the passed in value", func() {
4444
var nilMap map[int]string
4545
Expect(nilMap).ShouldNot(HaveKey("foo"))
4646
})
@@ -89,7 +89,7 @@ var _ = Describe("HaveKey", func() {
8989
})
9090

9191
When("passed a correctly typed nil", func() {
92-
It("should operate succesfully on the passed in value", func() {
92+
It("should operate successfully on the passed in value", func() {
9393
var nilIter2 func(func(string, int) bool)
9494
Expect(nilIter2).ShouldNot(HaveKey("foo"))
9595
})

‎matchers/have_key_with_value_matcher_test.go

+2-2
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ var _ = Describe("HaveKeyWithValue", func() {
4343
})
4444

4545
When("passed a correctly typed nil", func() {
46-
It("should operate succesfully on the passed in value", func() {
46+
It("should operate successfully on the passed in value", func() {
4747
var nilMap map[int]string
4848
Expect(nilMap).ShouldNot(HaveKeyWithValue("foo", "bar"))
4949
})
@@ -104,7 +104,7 @@ var _ = Describe("HaveKeyWithValue", func() {
104104
})
105105

106106
When("passed a correctly typed nil", func() {
107-
It("should operate succesfully on the passed in value", func() {
107+
It("should operate successfully on the passed in value", func() {
108108
var nilIter2 func(func(string, int) bool)
109109
Expect(nilIter2).ShouldNot(HaveKeyWithValue("foo", 0))
110110
})

‎matchers/have_len_matcher_test.go

+2-2
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ var _ = Describe("HaveLen", func() {
3232
})
3333

3434
When("passed a correctly typed nil", func() {
35-
It("should operate succesfully on the passed in value", func() {
35+
It("should operate successfully on the passed in value", func() {
3636
var nilSlice []int
3737
Expect(nilSlice).Should(HaveLen(0))
3838

@@ -71,7 +71,7 @@ var _ = Describe("HaveLen", func() {
7171
})
7272

7373
When("passed a correctly typed nil", func() {
74-
It("should operate succesfully on the passed in value", func() {
74+
It("should operate successfully on the passed in value", func() {
7575
var nilIter func(func(string) bool)
7676
Expect(nilIter).Should(HaveLen(0))
7777

‎matchers/match_regexp_matcher_test.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ var _ = Describe("MatchRegexp", func() {
1515
})
1616

1717
When("actual is a stringer", func() {
18-
It("should call the stringer and match agains the returned string", func() {
18+
It("should call the stringer and match against the returned string", func() {
1919
Expect(&myStringer{a: "Abc3"}).Should(MatchRegexp(`[A-Z][a-z]+\d`))
2020
})
2121
})

‎matchers/receive_matcher_test.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -289,7 +289,7 @@ var _ = Describe("ReceiveMatcher", func() {
289289
})
290290
})
291291

292-
When("acutal is a non-channel", func() {
292+
When("actual is a non-channel", func() {
293293
It("should error", func() {
294294
var nilChannel chan bool
295295

‎types/types.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ type GomegaTestingT interface {
1313
Fatalf(format string, args ...interface{})
1414
}
1515

16-
// Gomega represents an object that can perform synchronous and assynchronous assertions with Gomega matchers
16+
// Gomega represents an object that can perform synchronous and asynchronous assertions with Gomega matchers
1717
type Gomega interface {
1818
Ω(actual interface{}, extra ...interface{}) Assertion
1919
Expect(actual interface{}, extra ...interface{}) Assertion

0 commit comments

Comments
 (0)
Please sign in to comment.