David Aldridge<p>Suppose you want a test in <a href="https://ruby.social/tags/Rails" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>Rails</span></a> <a href="https://ruby.social/tags/ActiveRecord" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>ActiveRecord</span></a> that says "make sure this scope has applied". </p><p>How about using `<a href="https://ruby.social/tags/annotate" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>annotate</span></a>` in the scope definition, then testing the generated SQL for the presence of the annotation text?</p>