Confused about simplecov and rspec in rails
This is code in 开发者_运维知识库a model:
def find_tech
Category.find_by_name("tech")
end
and this is the rspec test:
x = Category.find_tech
x.name.should == "tech"
and the test passes. But rcov doesn't think so.
First of all why not ?
Second, if I do have to change something then what good is simplecov ?
Did you add SimpleCov's setup to the very top (line 1) of your spec_helper as stated in the Readme?
require 'simplecov' SimpleCov.start 'rails
精彩评论