Created
April 10, 2019 08:08
-
-
Save tfiechowski/7cc0e81b1c1be74ba62d535e1798114e to your computer and use it in GitHub Desktop.
Sample RSpec unit test
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
class HelloWorld | |
def say_hello | |
"Hello World!" | |
end | |
end | |
describe HelloWorld do | |
context “When testing the HelloWorld class” do | |
it "should say 'Hello World' when we call the say_hello method" do | |
hw = HelloWorld.new | |
message = hw.say_hello | |
expect(message).to eq "Hello World!" | |
end | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment