convert cookie tests to rspec