Sha256: c9400b5e1e72c361c0e15088356913a325bfa5544bd21b665f1d0b046f2441cd

Contents?: true

Size: 1.19 KB

Versions: 7

Compression:

Stored size: 1.19 KB

Contents

require 'simplecov'
require 'coveralls'

formatters = [SimpleCov::Formatter::HTMLFormatter, Coveralls::SimpleCov::Formatter]
SimpleCov.formatter = SimpleCov::Formatter::MultiFormatter::new(formatters)

SimpleCov.start do
  add_filter do |src|
    r = [
      src.filename =~ /lib/,
      src.filename =~ /models/,
      src.filename =~ /controllers/
    ].uniq
    r.count == 1 && r.first.nil?
  end

  add_filter "engine.rb"
  add_filter "spec.rb"
end

ENV["RAILS_ENV"] ||= "test"
require File.expand_path("../../spec/dummy/config/environment", __FILE__)
abort("The Rails environment is running in production mode!") if Rails.env.production?
require "pry"
require "spec_helper"
require "rspec/rails"
require "factory_bot_rails"

Dir[::RepoAnalyzer::Engine.root.join("spec/support/**/*.rb")].sort.each { |f| require f }

RSpec.configure do |config|
  config.fixture_path = "#{::RepoAnalyzer::Engine.root}/spec/assets"
  config.use_transactional_fixtures = true
  config.infer_spec_type_from_file_location!
  config.filter_rails_from_backtrace!

  config.filter_run :focus
  config.run_all_when_everything_filtered = true

  config.include FactoryBot::Syntax::Methods
  config.include ActionDispatch::TestProcess
end

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
repo_analyzer-1.6.0 spec/rails_helper.rb
repo_analyzer-1.5.0 spec/rails_helper.rb
repo_analyzer-1.4.0 spec/rails_helper.rb
repo_analyzer-1.3.0 spec/rails_helper.rb
repo_analyzer-1.2.0 spec/rails_helper.rb
repo_analyzer-1.1.0 spec/rails_helper.rb
repo_analyzer-1.0.0 spec/rails_helper.rb