[rspec-users] RSpec not testing ".sum"

Andrew Davis lists at ruby-forum.com
Mon Nov 15 15:13:12 EST 2010


Hello all,

I'm on the final stretch of testing my model, and I've realized that one
simple line isn't being tested. I was hoping to get some insight on what
I can do to accomplish this. The line that isn't being covered by Rcov
is the ".sum". See code here:

Test:
http://pastie.org/private/djdqtmatp58acas3ysszq

Model:
http://pastie.org/private/kphng5jjnfn2imz52nceq

So each Task Order has some crazy associations, but in the end, it's
summing the collection of criterion rollup scores. The test passes, but
the ".sum" isn't being covered. Might I be missing something?

rcov (0.9.9)
rspec (1.3.0)
rspec-rails (1.3.2)
rails (2.3.8)
ruby (1.8.7)

Thanks in advance,

Andrew Davis

-- 
Posted via http://www.ruby-forum.com/.


More information about the rspec-users mailing list