File: spec_helper.rb

package info (click to toggle)
ruby-memoizable 0.5.1-1
  • links: PTS, VCS
  • area: main
  • in suites: sid
  • size: 296 kB
  • sloc: ruby: 1,052; makefile: 4
file content (33 lines) | stat: -rw-r--r-- 743 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
# frozen_string_literal: true

begin
  require "simplecov"

  SimpleCov.formatters = [SimpleCov::Formatter::HTMLFormatter]

  SimpleCov.start do
    add_filter "/config"
    add_filter "/spec"
    add_filter "/vendor"
    command_name "spec"

    if RUBY_ENGINE == "ruby"
      enable_coverage :branch
      minimum_coverage line: 100, branch: 100
    else
      minimum_coverage line: 100
    end
  end
rescue LoadError
  warn "Warning: simplecov is not installed. Coverage analysis will be skipped."
end

require "memoizable"
require "rspec"
require "pathname"

# Require spec support files and shared behavior
Pathname.glob(Pathname(__dir__).join("{shared,support}", "**",
  "*.rb")).sort.each do |file|
  require file.sub_ext("").to_s
end