Skip to content

Instantly share code, notes, and snippets.

@taylonr
Created June 1, 2015 14:23

Revisions

  1. taylonr created this gist Jun 1, 2015.
    5 changes: 5 additions & 0 deletions Production
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,5 @@
    $scope.isBalancePositive = function(){
    if($scope.balance > 0){
    return true;
    }
    }
    6 changes: 6 additions & 0 deletions TestFile
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,6 @@
    describe('When balance is negative...', function(){
    it('Should return false', function(){
    $scope.balance = -1;
    expect($scope.isBalancePositive()).toBeFalsy();
    });
    });