It'd be better to change the test to ensure it's deprecated instead:

```ruby
def test_connection_instance_method_deprecation
  assert_deprecated { courses(:ruby).connection }
end
```

Or something like that.