Skip to content

Instantly share code, notes, and snippets.

@rjfranco
Last active July 18, 2019 17:27
Show Gist options
  • Save rjfranco/48ff9049ab2bcb105cec5e22bd939b8b to your computer and use it in GitHub Desktop.
Save rjfranco/48ff9049ab2bcb105cec5e22bd939b8b to your computer and use it in GitHub Desktop.
Sample ruby add and test
def add(n, n2)
n + n2
end
require 'rspec'
describe add do
it "should add two numbers" do
total = add(2, 2)
expect(total).to eq(4)
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment