Skip to content

Instantly share code, notes, and snippets.

@taylonr
Created June 1, 2015 14:23
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 taylonr/572c1b34014979dd28b7 to your computer and use it in GitHub Desktop.
Save taylonr/572c1b34014979dd28b7 to your computer and use it in GitHub Desktop.
Fail First
$scope.isBalancePositive = function(){
if($scope.balance > 0){
return true;
}
}
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