Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 1 addition & 3 deletions Gemfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,2 @@
source 'https://rubygems.org'
ruby '2.0.0'

gem 'rspec', '~> 3.0.0.beta2'
gem 'rspec'
5 changes: 4 additions & 1 deletion Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -19,4 +19,7 @@ PLATFORMS
ruby

DEPENDENCIES
rspec (~> 3.0.0.beta2)
rspec

BUNDLED WITH
1.16.5
7 changes: 5 additions & 2 deletions lib/deaf_grandma.rb
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,14 @@ def run!


def speak(input)
"SPEAK UP SONNY!"
end

#Implement your code here <<<<<<<<<

def yell(input)
"NOT SINCE 1964!"
end


private

def print_welcome
Expand Down
15 changes: 10 additions & 5 deletions lib/fizzbuzz.rb
Original file line number Diff line number Diff line change
@@ -1,11 +1,16 @@
class SuperFizzBuzz

def run(input)

#Implement your code here

case 0
when input%15
"FizzBuzz"
when input%5
"Buzz"
when input%3
"Fizz"
else
input
end
end

end

#You don't necessarily need to execute this script to complete this challenge, but how would you "run" this method (pun intended) so that it printed a value to the terminal?
Expand Down
4 changes: 2 additions & 2 deletions spec/deaf_grandma_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,10 @@
end

it "says 'NOT SINCE 1964!' when we yell" do
#implement your test here
expect(script.yell("Did you take your medicine?")).to eq "NOT SINCE 1964!"
end

it "EXTRA CREDIT: How would you test yelling BYE?" do
#implement your test here
expect(script.bye().to eq "SEE YOU LATER SONNY!")
end
end
6 changes: 3 additions & 3 deletions spec/fizzbuzz_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -9,14 +9,14 @@
end

it "returns 'Buzz' when my input is divisible by 5" do
#implement your test here
expect(script.run(10)).to eq "Buzz"
end

it "returns 'FizzBuzz' when input is divisible by 3 & 5" do
#implement your test here
expect(script.run(30)).to eq "FizzBuzz"
end

it "returns the input number when input isn't divisible by 3, 5, or both" do
#implement your test here
expect(script.run(4)).to eq 4
end
end