Sha256: 3e6be174c067f84e8f90a552b7b404c4ca6f03435a768edd5094a0f32d2f66f9
Contents?: true
Size: 823 Bytes
Versions: 63
Compression:
Stored size: 823 Bytes
Contents
# # Adapters are glorified SimpleCov configuration procs that can be easily # loaded using SimpleCov.start :rails and defined using # SimpleCov.adapters.define :foo do # # SimpleCov configuration here, same as in SimpleCov.configure # end # class SimpleCov::Adapters < Hash # # Define a SimpleCov adapter: # SimpleCov.adapters.define 'rails' do # # Same as SimpleCov.configure do .. here # end # def define(name, &blk) name = name.to_sym raise "SimpleCov Adapter '#{name}' is already defined" unless self[name].nil? self[name] = blk end # # Applies the adapter of given name on SimpleCov.configure # def load(name) name = name.to_sym raise "Could not find SimpleCov Adapter called '#{name}'" unless has_key?(name) SimpleCov.configure(&self[name]) end end
Version data entries
63 entries across 48 versions & 6 rubygems