spec/humanize_bytes/gbyte_spec.rb in humanize-bytes-0.0.1 vs spec/humanize_bytes/gbyte_spec.rb in humanize-bytes-0.0.2
- old
+ new
@@ -25,9 +25,15 @@
it "should convert the value to mega bytes" do
g.to_m.should == 3328
end
end
+ context "#to_g" do
+ it "should return the value" do
+ g.to_g.should == 3.25
+ end
+ end
+
context "#to_s" do
context "when value is a decimal" do
it "should print a humanized version of the value" do
g.to_s.should == '3.25 giga bytes'
end
\ No newline at end of file