My test coverage for the end of the app1 workshop shows 60% test coverage for the completions_controller and I can’t find the difference to explain why Josh gets 100% when he runs it. I’ve gone over much fo the video and can’t find what I’m missing.
Is there a way to get the finished project so that I can do a diff and find out what I missed? I’d like to see how this was tested.
I’m actually wondering if there’s something else going on. The code is:
def create todo = current_user.todos.find(params[:todo_id]) todo.touch :completed_at redirect_to todos_path end
and SimpleCov reports that the first line of this method has been tested, but not the last two. That makes no sense to me as the first line is a smple sequential statement and should fall right through to the last two. The app does what’s expected in the browser, too. [Edited to format code better]