Created
June 13, 2014 05:29
-
-
Save ryanholm/dffa6f21506038668a01 to your computer and use it in GitHub Desktop.
BLOC Reading RSpec Tests
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
#CP1 | |
def link_to(text,address) | |
"<a href='#{address}'>#{text}</a>" | |
end | |
# RSpec | |
describe "link_to" do | |
it "should return a valid link for Bloc" do | |
link_to("Bloc", "http://www.bloc.io").should eq("<a href='http://www.bloc.io'>Bloc</a>") | |
end | |
it "should return a valid link for Google" do | |
link_to("Google", "http://www.google.com").should eq("<a href='http://www.google.com'>Google</a>") | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment