I talked with Ivan and we're going to use the ActiveSupport::TestCase encapsulation. Here's a bug I opened to track this issue.

http://projects.theforeman.org/issues/4584

Feel free to handle it in a separate PR.