Sha256: 9063b5221c89a96ef6b146d1eebaebe3291de26a38edf95a20fd1397cbf4eee0

Contents?: true

Size: 1.03 KB

Versions: 6

Compression:

Stored size: 1.03 KB

Contents

require 'simplecov'

SimpleCov.start do
  add_filter 'spec'
  add_filter 'lib/decolmor/version.rb'

  if ENV['CI']
    require 'codecov'
    formatter SimpleCov::Formatter::Codecov
  else
    formatter SimpleCov::Formatter::MultiFormatter
                .new([SimpleCov::Formatter::HTMLFormatter])
  end

  track_files "**/*.rb"
end


require 'rspec'
require 'factory_bot'

RSpec.configure do |config|

  config.expose_dsl_globally = true

  # Use color in STDOUT
  config.color_mode = :on

  # Use color not only in STDOUT but also in pagers and files
  config.tty = true

  # Use the specified formatter
  config.formatter = :documentation # :progress, :html, :textmate

  config.include FactoryBot::Syntax::Methods

  config.before do
    FactoryBot.reload
  end

  config.before(:suite) do
    FactoryBot.find_definitions
  end
end

def load_class(file)
  klass = File.basename(file).gsub('_spec','')
  require File.expand_path("lib/#{klass}")
end

def docs(message, level=0)
  RSpec.configuration.reporter.message "#{'  ' * level}# #{message}"
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
decolmor-1.3.0 spec/spec_helper.rb
decolmor-1.2.0 spec/spec_helper.rb
decolmor-1.1.2 spec/spec_helper.rb
decolmor-1.1.1 spec/spec_helper.rb
decolmor-1.1.0 spec/spec_helper.rb
decolmor-1.0.0 spec/spec_helper.rb