Last active
August 29, 2015 14:18
-
-
Save PamBWillenz/4917d162f1a8b594acce to your computer and use it in GitHub Desktop.
Debugging Code
This file contains 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
# a + " + " + b + " = " + (a + b) | |
def add(a,b) | |
"#{a} + #{b} = #{a+b}" | |
end | |
p add(1,2) | |
p add(5,7) | |
p add(10,12) | |
OUTPUT | |
"1 + 2 = 3" | |
"5 + 7 = 12" | |
"10 + 12 = 22" | |
# describe "add" do | |
# it "returns a string with 1 and 2 added" do | |
# expect( add(1,2) ).to eq("1 + 2 = 3") | |
# end | |
# it "returns a string with 5 and 7 added" do | |
# expect( add(5,7) ).to eq("5 + 7 = 12") | |
# end | |
# end | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment