Sha256: 9351ae9b6f11c7309754ab49a29732d67d3c29944f5cd99b473275d69cb1e942
Contents?: true
Size: 813 Bytes
Versions: 22
Compression:
Stored size: 813 Bytes
Contents
# # 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 # class SimpleCov::Profiles < Hash # # Define a SimpleCov profile: # SimpleCov.profiles.define 'rails' do # # Same as SimpleCov.configure do .. here # end # def define(name, &blk) name = name.to_sym raise "SimpleCov Profile '#{name}' is already defined" unless self[name].nil? self[name] = blk end # # Applies the profile of given name on SimpleCov.configure # def load(name) name = name.to_sym raise "Could not find SimpleCov Profile called '#{name}'" unless has_key?(name) SimpleCov.configure(&self[name]) end end
Version data entries
22 entries across 16 versions & 4 rubygems