Open jcowgar opened 13 years ago
I'm having the same issue, but not necessarily only on classes. For instance:
if @user.update_attributes(params[:user])
format.html { redirect_to(@user, :notice => 'User was successfully updated.') }
format.xml { head :ok }
else
format.html { render :action => "edit" }
format.xml { render :xml => @user.errors, :status => :unprocessable_entity }
end # this line is marked as not having been executed
I just realized that it seemed to go away. I don't think I changed anything in the file, but upon running the tests again (perhaps several times) the coverage has gone up to 100%. I'll try to pay closer attention in the future to see if I can narrow down the cause/fix of the errant behavior.
I guess I am not adding much, but I see the same behavior: lines with only "end" on them and sometimes blank lines being counted as not tested.
With this being such a small file, it then appears in red as it is reported as 83.3% tested due to the class end not being counted as executed.