lib/coco/cover/coverage_result.rb in coco-0.7 vs lib/coco/cover/coverage_result.rb in coco-0.7.1
- old
+ new
@@ -6,23 +6,23 @@
class CoverageResult
# @return [Hash] Coverage for all the sources that live in the root project folder.
attr_reader :all_from_domain
# @return [Hash] Coverage for sources that are not sufficiently covered.
# More technically, the sources that live in the root project folder and for
- # which the coverage percentage is under the threeshold.
+ # which the coverage percentage is under the threshold.
attr_reader :covered_from_domain
# @param [Hash] config
# @param [Hash] raw_results Results obtained from Coverage.result
def initialize config, raw_results
@exclude_files = config[:excludes]
- @threeshold = config[:threeshold]
- raise ArgumentError if @threeshold < 0
+ @threshold = config[:threshold]
+ raise ArgumentError if @threshold < 0
@result = raw_results
exclude_external_sources
exclude_files_user_dont_want
- exclude_sources_above_threeshold
+ exclude_sources_above_threshold
end
private
def exclude_external_sources
@@ -35,12 +35,12 @@
@exclude_files.each do |filename|
@all_from_domain.delete(File.expand_path(filename))
end
end
- def exclude_sources_above_threeshold
+ def exclude_sources_above_threshold
@covered_from_domain = @all_from_domain.select {|key, value|
- CoverageStat.coverage_percent(value) < @threeshold
+ CoverageStat.coverage_percent(value) < @threshold
}
end
end