Permalink
Browse files

First test passing

  • Loading branch information...
1 parent 7276704 commit a14918670a7d84554c7338fea08460bdd650146b @bitlyfied committed Oct 9, 2011
Showing with 20 additions and 0 deletions.
  1. +6 −0 calculon.rb
  2. +14 −0 calculon_spec.rb
View
@@ -0,0 +1,6 @@
+class Calculon
+
+ def add( a, b )
+ a + b
+ end
+end
View
@@ -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.