Use same technique as rspec function