Skip to content

Instantly share code, notes, and snippets.

@gajus
Created September 24, 2014 12:33
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save gajus/32a61ea65183c4584682 to your computer and use it in GitHub Desktop.
Save gajus/32a61ea65183c4584682 to your computer and use it in GitHub Desktop.
describe('A Cart with a several different products', function () {
var cart;
beforeEach(function () {
cart = Cart.create();
});
it('must have a #grossPriceSum() of the contained products', function () {
var product = Product.create('A', 10),
book = Book.create('B', 100);
cart.add(product);
cart.add(book);
expect(cart.grossPriceSum()).toEqual(132);
});
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment