Sha256: c0eeccc273c61cc9936c395cd87d89424fd82f686ce3545b613e751070129607

Contents?: true

Size: 1.25 KB

Versions: 5

Compression:

Stored size: 1.25 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"

ActiveRecord::Migration.maintain_test_schema!

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

FactoryBot.definition_file_paths = ["#{::Rails.root}/spec/factories"]
FactoryBot.find_definitions

RSpec.configure do |config|
  config.fixture_path = "#{::Rails.root}/spec/assets"
  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

5 entries across 5 versions & 1 rubygems

Version Path
send_grid_mailer-2.4.0 spec/rails_helper.rb
send_grid_mailer-2.3.0 spec/rails_helper.rb
send_grid_mailer-2.2.0 spec/rails_helper.rb
send_grid_mailer-2.0.1 spec/rails_helper.rb
send_grid_mailer-2.0.0 spec/rails_helper.rb