Created
June 1, 2015 14:23
-
-
Save taylonr/572c1b34014979dd28b7 to your computer and use it in GitHub Desktop.
Fail First
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$scope.isBalancePositive = function(){ | |
if($scope.balance > 0){ | |
return true; | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
describe('When balance is negative...', function(){ | |
it('Should return false', function(){ | |
$scope.balance = -1; | |
expect($scope.isBalancePositive()).toBeFalsy(); | |
}); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment