Skip to content

Commit

Permalink
Merge pull request #43 from daniel-franz/patch-1
Browse files Browse the repository at this point in the history
fizzbuzz tests fail if num is divisible by 3 or 5
  • Loading branch information
rmurphey committed Jul 29, 2012
2 parents c695be6 + 57649a6 commit 8d2a9b5
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion tests/app/flowControl.js
Expand Up @@ -6,7 +6,11 @@ define([
], function(answers) { ], function(answers) {
describe("flow control", function() { describe("flow control", function() {
it("you should be able to conditionally branch your code", function() { it("you should be able to conditionally branch your code", function() {
var num = Math.floor(Math.random() * 10) + 1; var num = 0;

while (num % 3 === 0 || num % 5 === 0) {
num = Math.floor(Math.random() * 10) + 1;
}


expect(answers.fizzBuzz()).not.to.be.ok(); expect(answers.fizzBuzz()).not.to.be.ok();
expect(answers.fizzBuzz(2)).to.be(2); expect(answers.fizzBuzz(2)).to.be(2);
Expand Down

0 comments on commit 8d2a9b5

Please sign in to comment.