Skip to content

Commit

Permalink
v2.8.0
Browse files Browse the repository at this point in the history
  • Loading branch information
onsi committed Jan 30, 2023
1 parent 2f6597c commit 64c4110
Show file tree
Hide file tree
Showing 2 changed files with 50 additions and 1 deletion.
49 changes: 49 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,52 @@
## 2.8.0

### Features

- Introduce GinkgoHelper() to track and exclude helper functions from potential CodeLocations [e19f556]

Modeled after `testing.T.Helper()`. Now, rather than write code like:

```go
func helper(model Model) {
Expect(model).WithOffset(1).To(BeValid())
Expect(model.SerialNumber).WithOffset(1).To(MatchRegexp(/[a-f0-9]*/))
}
```

you can stop tracking offsets (which makes nesting composing helpers nearly impossible) and simply write:

```go
func helper(model Model) {
GinkgoHelper()
Expect(model).To(BeValid())
Expect(model.SerialNumber).To(MatchRegexp(/[a-f0-9]*/))
}
```

- Introduce GinkgoLabelFilter() and Label().MatchesLabelFilter() to make it possible to programmatically match filters (fixes #1119) [2f6597c]

You can now write code like this:

```go
BeforeSuite(func() {
if Label("slow").MatchesLabelFilter(GinkgoLabelFilter()) {
// do slow setup
}

if Label("fast").MatchesLabelFilter(GinkgoLabelFilter()) {
// do fast setup
}
})
```

to programmatically check whether a given set of labels will match the configured `--label-filter`.

### Maintenance

- Bump webrick from 1.7.0 to 1.8.1 in /docs (#1125) [ea4966e]
- cdeql: add ruby language (#1124) [9dd275b]
- dependabot: add bundler package-ecosystem for docs (#1123) [14e7bdd]

## 2.7.1

### Fixes
Expand Down
2 changes: 1 addition & 1 deletion types/version.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
package types

const VERSION = "2.7.1"
const VERSION = "2.8.0"

0 comments on commit 64c4110

Please sign in to comment.