Created
April 5, 2020 10:37
-
-
Save r3id/cdb6c5521aab9e3cab122d3430dab439 to your computer and use it in GitHub Desktop.
Rspec Tutorial
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 Dog | |
def bark | |
"Meow!" | |
end | |
end |
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
require 'rspec' | |
require_relative 'dog' | |
describe Dog do | |
describe '#bark' do | |
it 'returns the string "Woof!"' do | |
expect(subject.bark).to eql('Woof!') | |
end | |
end | |
end |
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
source 'https://rubygems.org' | |
gem 'rspec' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment