Skip to content

Instantly share code, notes, and snippets.

@poysama
Last active August 29, 2015 14:06
Show Gist options
  • Save poysama/3575b9c4f12379da0c3b to your computer and use it in GitHub Desktop.
Save poysama/3575b9c4f12379da0c3b to your computer and use it in GitHub Desktop.
testing
#!/usr/bin/env ruby
describe Adder do
before(:each) do
@adder = Adder.new
end
it "should add 2 numbers" do
expect { @added.add(1,2) }.to equal 3
end
end
class Adder
def initialize
end
def add(num1, num2)
num1 + num2
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment