Skip to content

Instantly share code, notes, and snippets.

@r3id
Created April 5, 2020 10:37
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save r3id/cdb6c5521aab9e3cab122d3430dab439 to your computer and use it in GitHub Desktop.
Save r3id/cdb6c5521aab9e3cab122d3430dab439 to your computer and use it in GitHub Desktop.
Rspec Tutorial
class Dog
def bark
"Meow!"
end
end
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
source 'https://rubygems.org'
gem 'rspec'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment