You can dry this all out using:

```ruby
let(:content) do
  capture(:stdout) { Lint.validate(@filename) }
end
```

and set @filename in the examples.