Skip to content

Commit

Permalink
First test passing
Browse files Browse the repository at this point in the history
  • Loading branch information
bitlyfied committed Oct 9, 2011
1 parent 7276704 commit a149186
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 0 deletions.
6 changes: 6 additions & 0 deletions calculon.rb
@@ -0,0 +1,6 @@
class Calculon

def add( a, b )
a + b
end
end
14 changes: 14 additions & 0 deletions calculon_spec.rb
@@ -0,0 +1,14 @@
require "rspec"
require "./calculon"

describe "Calculon" do

before(:each) do
@calculon = Calculon.new
end

it "should add two numbers" do
result = @calculon.add 2, 6
result.should == 8
end
end

0 comments on commit a149186

Please sign in to comment.