Slide 86
Slide 86 text
run it yourself!
http://is.gd/logic3
describe('CallList', function() {
var subject;
beforeEach(function() {
subject = new CallList({items: ['A','B','C']});
});
describe("#moveUp", function() {
context("moving up C", function() {...});
context("moving up B", function() {...});
context("moving up A", function() {
beforeEach(function() {
subject.moveUp('A');
});
it("leaves the items as they were", function() {
expect(subject.get('items')).toEqual(['A','B','C']);
});
});
});
});