Refactor cart_test.rb