If you only want `cli` defined once for all the tests (because calling `new` is expensive`, then do

```ruby
before(:all) do
  @cli = Rex::Proto::Http::Client.new(ip)
end
```

and refer to `@cli` in the examples.

If `new` isn't expensive, then do

```ruby
subject(:client) do
  Rex::Proto::Http::Client.new(ip)
end
```

and refer to `client` instead of `cli` in the examples.

The second way ensures that the examples won't interfere with each other since `client` will reset for each example, so it would be preferred.