Skip to content
Open

Done #12

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
13 changes: 12 additions & 1 deletion lib/catch_phrases.rb
Original file line number Diff line number Diff line change
@@ -1,8 +1,19 @@
def mario
status = 'Thank You Mario! But Our Princess Is In Another Castle!'
phrase = "It's-a me, Mario!"
puts phrase
end

def toadstool
status = 'Thank You Mario! But Our Princess Is In Another Castle!'
puts status
end

def link
puts "It's Dangerous To Go Alone! Take This."
end

def all_phrases
mario
toadstool
link
end
5 changes: 4 additions & 1 deletion spec/catch_phrases_spec.rb
Original file line number Diff line number Diff line change
@@ -1,19 +1,22 @@
require 'spec_helper'

describe "mario" do
it "puts out 'It's-a me, Mario!'" do
it "puts out a catch phrase" do
phrase = "It's-a me, Mario!"
expect{mario}.to output("It's-a me, Mario!\n").to_stdout
end
end

describe "toadstool" do
it "puts out 'Thank You Mario! But Our Princess Is In Another Castle!'" do
status = "Thank You Mario! But Our Princess Is In Another Castle!"
expect{toadstool}.to output("Thank You Mario! But Our Princess Is In Another Castle!\n").to_stdout
end
end

describe "link" do
it "puts out 'It's Dangerous To Go Alone! Take This.'" do
phrase = "It's Dangerous To Go Alone! Take This."
expect{link}.to output("It's Dangerous To Go Alone! Take This.\n").to_stdout
end
end
Expand Down