Refactor to RSpec