This file contains hidden or 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
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> |
This file contains hidden or 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
require "~/development/tested/lib/fizzbuzz.rb" | |
describe FizzBuzz do | |
describe '#fizzbuzzer' do | |
it "accurately outputs for various integers" do | |
expect(fizzbuzzer(9)).to eql("Fizz") | |
end | |
end | |
end |
This file contains hidden or 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
class FizzBuzz | |
require 'json' | |
def initialize (input) | |
@max = input | |
end | |
def modulo_parse (n) | |
if n % 15 == 0 |
This file contains hidden or 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
class FizzBuzz | |
def as_text (input) | |
input.to_string | |
end | |
def fizzbuzzer (limit) | |
(1..limit).map do |n| | |
if n % 15 == 0 | |
"fizzbuzz" |
NewerOlder