class SimpleCov::Profiles
Profiles
are SimpleCov
configuration procs that can be easily loaded using SimpleCov.start
:rails and defined using
SimpleCov.profiles.define :foo do # SimpleCov configuration here, same as in SimpleCov.configure end
Public Instance Methods
Source
# File lib/simplecov/profiles.rb, line 18 def define(name, &blk) name = name.to_sym raise "SimpleCov Profile '#{name}' is already defined" unless self[name].nil? self[name] = blk end
Define a SimpleCov
profile:
SimpleCov.profiles.define 'rails' do # Same as SimpleCov.configure do .. here end
Source
# File lib/simplecov/profiles.rb, line 28 def load(name) name = name.to_sym raise "Could not find SimpleCov Profile called '#{name}'" unless key?(name) SimpleCov.configure(&self[name]) end
Applies the profile of given name on SimpleCov.configure