Skip to content

Instantly share code, notes, and snippets.

Camron cshimy

Block or report user

Report or block cshimy

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile

Shopping Cart

In this example, we'll ask you to build a ShoppingCart class which contains multiple items, and provides a method of adding, removing and updating items belonging to a cart. The ShoppingCart class is a plain Ruby class, which should only use objects which belong to the standard Ruby library.

First, fork this example. Click 'Fork' above. Then, you'll clone, edit, add, commit and push your changes as necessary. Notify us with a link to your forked example when you're finished.

Please first develop tests (either using TDD or BDD libraries of your choice -- we like Test::Unit and RSpec, but you're free to use whatever method you're comfortable with) before you write actual code. We're a test-driven shop.

Acceptance Criteria

You can’t perform that action at this time.