FixedDeliverable.spent will now return the fixed cost. #1439

This commit is contained in:
Eric Davis committed 2008-07-10 17:36:14 -07:00
1 parent abc4dd84c6
commit c90e7337f5
2 files changed
+11 -7

No files matched your search

+8 -4
View File
@@ -8,11 +8,15 @@ describe FixedDeliverable, '.score' do
end
describe FixedDeliverable, '.spent' do
it 'should always equal the progress % * budget' do
it 'should always equal the fixed cost if there are no hours logged' do
@deliverable = FixedDeliverable.new({ :subject => 'test' })
@deliverable.stub!(:progress).and_return(50.0)
@deliverable.stub!(:budget).and_return(5000.0)
@deliverable.spent.should eql(2500.0)
@deliverable.stub!(:fixed_cost).and_return(5000.0)
@deliverable.spent.should eql(5000.0)
end
it 'should return 0.0 if fixed_cost is not set' do
@deliverable = FixedDeliverable.new({ :subject => 'test' })
@deliverable.spent.should eql(0.0)
end
end