You can do without the local variable here. Just:

```ruby
query.has_filter?('status_id').should be_true
```