[#4182] Added an OverheadBudget to track a Deliverable's overhead.

This commit is contained in:
Eric Davis
2010-07-07 10:38:58 -07:00
parent fdd49642b2
commit b22db284c5
9 changed files with 105 additions and 7 deletions
+29
View File
@@ -0,0 +1,29 @@
require File.dirname(__FILE__) + '/../test_helper'
class OverheadBudgetTest < ActiveSupport::TestCase
should_belong_to :deliverable
context "#budget=" do
should "strip dollar signs when writing" do
e = OverheadBudget.new
e.budget = '$100.00'
assert_equal 100.00, e.budget.to_f
end
should "strip commas when writing" do
e = OverheadBudget.new
e.budget = '20,100.00'
assert_equal 20100.00, e.budget.to_f
end
should "strip spaces when writing" do
e = OverheadBudget.new
e.budget = '20 100.00'
assert_equal 20100.00, e.budget.to_f
end
end
end