Rewrite to use new RSpec format, helper functions