summaryrefslogtreecommitdiff
path: root/spec
diff options
context:
space:
mode:
authormo khan <mo@mokhan.ca>2015-11-19 20:53:31 -0700
committermo khan <mo@mokhan.ca>2015-11-19 20:53:31 -0700
commit867b141c4678ce046936c6b61d0353c61634fba6 (patch)
treeed5be5feb46564d445aa3783b444014773652e1a /spec
parent598930b3f4b4fc6410e896c503ef4179be086328 (diff)
add fizzbuzz spec.
Diffstat (limited to 'spec')
-rw-r--r--spec/fizzbuzz_spec.rb29
1 files changed, 29 insertions, 0 deletions
diff --git a/spec/fizzbuzz_spec.rb b/spec/fizzbuzz_spec.rb
new file mode 100644
index 0000000..b8437f2
--- /dev/null
+++ b/spec/fizzbuzz_spec.rb
@@ -0,0 +1,29 @@
+=begin
+ Write a program that prints the numbers from 1 to 100.
+ But for multiples of three print "Fizz" instead of the
+ number and for the multiples of five print “Buzz”. For
+ numbers which are multiples of both three and five
+ print "FizzBuzz".
+=end
+
+def fizz_buzz(n)
+end
+
+describe "FizzBuzz" do
+ it "returns each number" do
+ [1, 2, 4, 7, 8].each do |n|
+ expect(fizz_buzz(n)).to eql(n)
+ end
+ end
+
+ xit "returns 'Fizz'" do
+ expect(fizz_buzz(3)).to eql("Fizz")
+ end
+
+ xit "returns 'Buzz'" do
+ expect(fizz_buzz(5)).to eql("Buzz")
+ end
+
+ xit "returns 'FizzBuzz'" do
+ end
+end