class SimpleCov::Profiles

Public Instance Methods

define(name, &blk) click to toggle source

Define a SimpleCov profile:

SimpleCov.profiles.define 'rails' do
  # Same as SimpleCov.configure do .. here
end
# File lib/simplecov/profiles.rb, line 16
def define(name, &blk)
  name = name.to_sym
  fail "SimpleCov Profile '#{name}' is already defined" unless self[name].nil?
  self[name] = blk
end
load(name) click to toggle source

Applies the profile of given name on SimpleCov.configure

# File lib/simplecov/profiles.rb, line 25
def load(name)
  name = name.to_sym
  fail "Could not find SimpleCov Profile called '#{name}'" unless key?(name)
  SimpleCov.configure(&self[name])
end