<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array"/>
  <modified type="array">
    <modified>
      <diff>@@ -1,119 +1,54 @@
 require File.expand_path(File.dirname(__FILE__) + '/spec_helper')
 
-describe &quot;Fractional&quot;, &quot;to_f&quot; do
-  
-  it &quot;should parse '1/2' to 0.5&quot; do
-    Fractional.to_f('1/2').should == 0.5
-  end
-  
-  it &quot;should parse '1 2/4' to 1.5&quot; do
-    Fractional.to_f('1 2/4').should == 1.5
-  end
-  
-  it &quot;should parse '1.5' to 1.5&quot; do
-    Fractional.to_f('1.5').should == 1.5    
-  end
+describe &quot;Fractional&quot; do
 
-  it &quot;should parse 1.5 to 1.5&quot; do
-    Fractional.to_f(1.5).should == 1.5    
-  end
-  
-  it &quot;should parse '1100 7/8' to 1100.875&quot; do
-    Fractional.to_f(&quot;1100 7/8&quot;).should == 1100.875
-  end
-  
-  it &quot;should allow for negative mixed fractions&quot; do
-    Fractional.to_f('-10 1/2').should == -10.5    
-  end
-  
-  it &quot;should allow for negative single fractions&quot; do
-    Fractional.to_f(&quot;-1/64&quot;).should == -0.015625
+  it &quot;should create a fractional object from a string&quot; do
+    one_half = Fractional.new(&quot;1/2&quot;)
   end
-  
-end
 
-describe &quot;Fractional&quot;, &quot;to_s&quot; do
-  
-  it &quot;should return 0.5 as '1/2'&quot; do
-    Fractional.to_s(0.5).should == '1/2'
-  end
-  
-  it &quot;should return 1.5 as '1 1/2'&quot; do
-    Fractional.to_s(1.5).should == '1 1/2'
-  end
-    
-  it &quot;should parse 1100.875 to '1100 7/8'&quot; do
-    Fractional.to_s(1100.875).should == &quot;1100 7/8&quot;
+  it &quot;should create a fractional object from a string&quot; do
+    one_half = Fractional.new(&quot;1/2&quot;)
   end
 
-  it &quot;should not have a fraction if it's just a whole number&quot; do
-    Fractional.to_s(1100).should == &quot;1100&quot;    
-  end
-  
-  it &quot;should round if passed 'to nearest'&quot; do
-    Fractional.to_s(1100.14285714286, :to_nearest =&gt; &quot;1/64&quot;).should == &quot;1100 9/64&quot;
-  end
-  
-  it &quot;should round if passed 'to_nearest' that is a float&quot; do
-    Fractional.to_s(1100.14285714286, :to_nearest =&gt; 0.015625).should == &quot;1100 9/64&quot;    
+  it &quot;should create a fractional object from a string&quot; do
+    one_half = Fractional.new(&quot;1/2&quot;)
   end
   
-  it &quot;should round if passed 'to_nearest' and is a simple fraction&quot; do
-    Fractional.to_s(0.14285714286, :to_nearest =&gt; &quot;1/64&quot;).should == &quot;9/64&quot;
+  it &quot;should convert fractional to string&quot; do
+    one_half = Fractional.new(&quot;1/2&quot;)
+    one_half.to_s.should == &quot;1/2&quot;
   end
   
-  it &quot;should round if passed 'to_nearest' that rounds to nearest whole number&quot; do
-    Fractional.to_s(1100.875, :to_nearest =&gt; &quot;1/2&quot;).should == &quot;1101&quot;
-    Fractional.to_s(1100.2, :to_nearest =&gt; &quot;1/2&quot;).should == &quot;1100&quot;
+  it &quot;should convert fractional to float&quot; do
+    one_half = Fractional.new(&quot;1/2&quot;)
+    one_half.to_f.should == 0.5
   end
   
-  it &quot;should allow for negative values for mixed fractions&quot; do
-    Fractional.to_s(-1100.875).should == &quot;-1100 7/8&quot;
-  end
-  
-  it &quot;should allow for negative values for single fractions&quot; do
-    Fractional.to_s(-0.875).should == &quot;-7/8&quot;
-  end
-  
-  it &quot;should allow for negative mixed fractions that that are rounded&quot; do
-    Fractional.to_s(-101.140625, :to_nearest =&gt; &quot;1/64&quot;).should == &quot;-101 9/64&quot;
-  end
-  
-  it &quot;should allow for negative single fractions that that are rounded&quot; do
-    Fractional.to_s(-0.140625, :to_nearest =&gt; &quot;1/64&quot;).should == &quot;-9/64&quot;
-  end
-  
-  
-end
-
-describe &quot;Fractional&quot;, &quot;round&quot; do
-  
-  it &quot;should round 0.142857142857143 to nearest 1/64th as 0.140625&quot; do
-    Fractional.round_to_nearest_fraction(0.142857142857143, &quot;1/64&quot;).should == 0.140625
+  it &quot;should add two fractionals together&quot; do
+    one_half = Fractional.new(&quot;1/2&quot;)
+    another_one_half = Fractional.new(&quot;1/2&quot;)
+    
+    (one_half + another_one_half).to_f.should == 1.0
   end
 
-  it &quot;should round '1/7' to nearest 1/64th as '9/64'&quot; do
-    Fractional.round_to_nearest_fraction('1/7', &quot;1/64&quot;).should == '9/64'
-  end
-  
-  it &quot;should round 0.125 to nearest 1/64th as 0.125&quot; do
-    Fractional.round_to_nearest_fraction(0.125, &quot;1/64&quot;).should == 0.125
+  it &quot;should minus a fractional from another fractional&quot; do
+    one_and_a_half = Fractional.new(&quot;1 1/2&quot;)
+    one_quarter = Fractional.new(&quot;1/4&quot;)
+    
+    (one_and_a_half - one_quarter).to_f.should == 1.25
   end
 
-  it &quot;should round '1100 1/7' to nearest 1/64th as '1100 9/64'&quot; do
-    Fractional.round_to_nearest_fraction('1100 1/7', &quot;1/64&quot;).should == '1100 9/64'
-  end
-  
-  it &quot;should round 1100.142857142857143 to nearest 1/64th as 1100.140625&quot; do
-    Fractional.round_to_nearest_fraction(1100.142857142857143, &quot;1/64&quot;).should == 1100.140625
-  end
-  
-  it &quot;should round if passed 'to_nearest' that rounds to nearest whole number&quot; do
-    Fractional.round_to_nearest_fraction(1100.875, &quot;1/2&quot;).should == 1101
-    Fractional.round_to_nearest_fraction(1100.1, &quot;1/2&quot;).should == 1100    
+  it &quot;should multiply 2 fractionals together&quot; do
+    first_fraction = Fractional.new(&quot;1 7/8&quot;)
+    second_fraction = Fractional.new(&quot;11 15/64&quot;)
+    
+    (first_fraction * second_fraction).to_f.should == 21.064453125
   end
   
-  it &quot;should round if passed a float&quot; do
-    Fractional.round_to_nearest_fraction(1100.875, 0.5).should == 1101
+  it &quot;should divide 2 fractionals together&quot; do
+    first_fraction = Fractional.new(&quot;1 7/8&quot;)
+    second_fraction = Fractional.new(&quot;21 33/512&quot;)
+    
+    (second_fraction / first_fraction).to_s.should == &quot;11 15/64&quot;
   end
-end
+end
\ No newline at end of file</diff>
      <filename>spec/fractional_spec.rb</filename>
    </modified>
  </modified>
  <removed type="array">
    <removed>
      <filename>spec/fractional_spec.rb.rb</filename>
    </removed>
  </removed>
  <parents type="array">
    <parent>
      <id>2aef1a00433194e76366149770c49eed809705bb</id>
    </parent>
  </parents>
  <author>
    <name>Chris O'Sullivan</name>
    <email>thechrisoshow@gmail.com</email>
  </author>
  <url>http://github.com/thechrisoshow/fractional/commit/02adb359363b71aa6bc45f0940d587eb4e7a8d47</url>
  <id>02adb359363b71aa6bc45f0940d587eb4e7a8d47</id>
  <committed-date>2009-10-16T03:34:49-07:00</committed-date>
  <authored-date>2009-10-16T03:34:49-07:00</authored-date>
  <message>Woops - renamed fractional_spec</message>
  <tree>d2d65fd2a0e9067a63b729426035adb070445126</tree>
  <committer>
    <name>Chris O'Sullivan</name>
    <email>thechrisoshow@gmail.com</email>
  </committer>
</commit>
