Permalink
Browse files

Merge pull request #43 from daniel-franz/patch-1

fizzbuzz tests fail if num is divisible by 3 or 5
  • Loading branch information...
2 parents c695be6 + 57649a6 commit 8d2a9b59bd8392ae7d1ce93fa14608748ebd3035 @rmurphey committed Jul 29, 2012
Showing with 5 additions and 1 deletion.
  1. +5 −1 tests/app/flowControl.js
@@ -6,7 +6,11 @@ define([
], function(answers) {
describe("flow control", 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(2)).to.be(2);

0 comments on commit 8d2a9b5

Please sign in to comment.