var TwoBucket = require('./two-bucket');

describe('TwoBucket', function () {
  describe('works for input of 3,5,1', function () {
    var buckOne = 3;
    var buckTwo = 5;
    var goal = 1;

    it('starting with bucket one', function () {
      var starterBuck = 'one'; // indicates which bucket to fill first
      var twoBucket = new TwoBucket(buckOne, buckTwo, goal, starterBuck);
      expect(twoBucket.moves()).toEqual(4); // includes the first fill
      expect(twoBucket.goalBucket).toEqual('one'); // which bucket should end up with the desired # of liters
      expect(twoBucket.otherBucket).toEqual(5); // leftover value in the "other" bucket once the goal has been reached
    });

    xit('starting with bucket two', function () {
      var starterBuck = 'two';
      var twoBucket = new TwoBucket(buckOne, buckTwo, goal, starterBuck);
      expect(twoBucket.moves()).toEqual(8);
      expect(twoBucket.goalBucket).toEqual('two');
      expect(twoBucket.otherBucket).toEqual(3);
    });
  });

  describe('works for input of 7,11,2', function () {
    var buckOne = 7;
    var buckTwo = 11;
    var goal = 2;

    xit('starting with bucket one', function () {
      var starterBuck = 'one';
      var twoBucket = new TwoBucket(buckOne, buckTwo, goal, starterBuck);
      expect(twoBucket.moves()).toEqual(14);
      expect(twoBucket.goalBucket).toEqual('one');
      expect(twoBucket.otherBucket).toEqual(11);
    });

    xit('starting with bucket two', function () {
      var starterBuck = 'two';
      var twoBucket = new TwoBucket(buckOne, buckTwo, goal, starterBuck);
      expect(twoBucket.moves()).toEqual(18);
      expect(twoBucket.goalBucket).toEqual('two');
      expect(twoBucket.otherBucket).toEqual(7);
    });
  });
});

@@ -87,32 +87,70 @@
 be('
-works for input of 3,5,1
+Measure using bucket one of size 3 and bucket two of size 5 - 
 ', f
@@ -170,24 +170,26 @@
     var buck
+et
 One = 3;%0A   
@@ -193,24 +193,26 @@
     var buck
+et
 Two = 5;%0A   
@@ -232,35 +232,32 @@
 ;%0A%0A    it('start
-ing
  with bucket one
@@ -277,79 +277,8 @@
 ) %7B%0A
-      var starterBuck = 'one'; // indicates which bucket to fill first%0A
     
@@ -305,32 +305,34 @@
 w TwoBucket(buck
+et
 One, buckTwo, go
@@ -316,32 +316,34 @@
 (bucketOne, buck
+et
 Two, goal, start
@@ -333,38 +333,33 @@
 tTwo, goal, 
-starterBuck
+'one'
 );%0A
+%0A
       expect
@@ -661,35 +661,32 @@
 %0A%0A    xit('start
-ing
  with bucket two
@@ -706,39 +706,8 @@
 ) %7B%0A
-      var starterBuck = 'two';%0A
     
@@ -734,32 +734,34 @@
 w TwoBucket(buck
+et
 One, buckTwo, go
@@ -745,32 +745,34 @@
 (bucketOne, buck
+et
 Two, goal, start
@@ -762,38 +762,33 @@
 tTwo, goal, 
-starterBuck
+'two'
 );%0A
+%0A
       expect
@@ -949,33 +949,71 @@
 be('
-works for input of 7,11,2
+Measure using bucket one of size 7 and bucket two of size 11 - 
 ', f
@@ -1037,16 +1037,18 @@
 var buck
+et
 One = 7;
@@ -1060,16 +1060,18 @@
 var buck
+et
 Two = 11
@@ -1097,35 +1097,32 @@
 %0A%0A    xit('start
-ing
  with bucket one
@@ -1142,39 +1142,8 @@
 ) %7B%0A
-      var starterBuck = 'one';%0A
     
@@ -1170,32 +1170,34 @@
 w TwoBucket(buck
+et
 One, buckTwo, go
@@ -1181,32 +1181,34 @@
 (bucketOne, buck
+et
 Two, goal, start
@@ -1198,38 +1198,33 @@
 tTwo, goal, 
-starterBuck
+'one'
 );%0A
+%0A
       expect
@@ -1379,19 +1379,16 @@
 t('start
-ing
  with bu
@@ -1416,39 +1416,8 @@
 ) %7B%0A
-      var starterBuck = 'two';%0A
     
@@ -1452,16 +1452,18 @@
 ket(buck
+et
 One, buc
@@ -1463,16 +1463,18 @@
 ne, buck
+et
 Two, goa
@@ -1480,22 +1480,17 @@
 al, 
-starterBuck
+'two'
 );%0A
+%0A
     

Conform to terminology in canonical data