Method: SimpleCov::Configuration#root

Defined in:
lib/simplecov/configuration.rb

#root(root = nil) ⇒ Object

The root for the project. This defaults to the current working directory.

Configure with SimpleCov.root(‘/my/project/path’)



22
23
24
25
26
27
# File 'lib/simplecov/configuration.rb', line 22

def root(root = nil)
  return @root if defined?(@root) && root.nil?

  @coverage_path = nil # invalidate cache
  @root = File.expand_path(root || Dir.getwd)
end