It looks like this is only used in the `#detect_tag` section, I think it would make more sense to have it defined there rather than globally as it makes it easier to understand those tests.