C
Ch Ba
So I have a piece of code that I didn't write a spec for, and now rcov
is yelling at me about it. The problem is that I'm not really sure how I
should do it.
def build_structure(paths)
unless File::exists?('specdoc')
Dir.mkdir('specdoc')
end
paths.each do |path|
FileUtils.makedirs("specdoc/#{strip_file(path)}")
end
end
I want to make sure I have good coverage, but should I just come up with
some random paths, make it make them and then delete them? I just don't
know how to come at this one to get a good spec. Any ideas?
is yelling at me about it. The problem is that I'm not really sure how I
should do it.
def build_structure(paths)
unless File::exists?('specdoc')
Dir.mkdir('specdoc')
end
paths.each do |path|
FileUtils.makedirs("specdoc/#{strip_file(path)}")
end
end
I want to make sure I have good coverage, but should I just come up with
some random paths, make it make them and then delete them? I just don't
know how to come at this one to get a good spec. Any ideas?