Rewrite RSpec tests