Sha256: 682eb16459a63d80b823ad2df38f59871342bee9168d74fcb96dccbbd32aedef

Contents?: true

Size: 1.44 KB

Versions: 10

Compression:

Stored size: 1.44 KB

Contents

<% if settings.build_simple_cov %>
require "simplecov"

unless ENV["NO_COVERAGE"]
  SimpleCov.start do
    add_filter %r(^/spec/)
    enable_coverage :branch
    enable_coverage_for_eval
    minimum_coverage_by_file line: 95, branch: 95
  end
end
<% end %>

Bundler.require :tools

require "<%= settings.project_path %>"
<% if settings.build_refinements %>
require "refinements"
<% end %>

<% if settings.build_refinements %>
SPEC_ROOT = Pathname(__dir__).realpath.freeze

using Refinements::Pathname

Pathname.require_tree SPEC_ROOT.join("support/shared_contexts")
<% else %>

SPEC_ROOT = Pathname(__dir__).realpath.freeze

Dir[File.join(SPEC_ROOT, "support", "shared_contexts", "**/*.rb")].each { |path| require path }
<% end %>

RSpec.configure do |config|
  config.color = true
  config.disable_monkey_patching!
  config.example_status_persistence_file_path = "./tmp/rspec-examples.txt"
  config.filter_run_when_matching :focus
  config.formatter = ENV.fetch("CI", false) == "true" ? :progress : :documentation
  config.order = :random
  config.pending_failure_output = :no_backtrace
  config.shared_context_metadata_behavior = :apply_to_host_groups
  config.warnings = true

  config.expect_with :rspec do |expectations|
    expectations.syntax = :expect
    expectations.include_chain_clauses_in_custom_matcher_descriptions = true
  end

  config.mock_with :rspec do |mocks|
    mocks.verify_doubled_constant_names = true
    mocks.verify_partial_doubles = true
  end
end

Version data entries

10 entries across 10 versions & 1 rubygems

Version Path
rubysmith-7.9.0 lib/rubysmith/templates/%project_name%/spec/spec_helper.rb.erb
rubysmith-7.8.0 lib/rubysmith/templates/%project_name%/spec/spec_helper.rb.erb
rubysmith-7.7.0 lib/rubysmith/templates/%project_name%/spec/spec_helper.rb.erb
rubysmith-7.6.0 lib/rubysmith/templates/%project_name%/spec/spec_helper.rb.erb
rubysmith-7.5.0 lib/rubysmith/templates/%project_name%/spec/spec_helper.rb.erb
rubysmith-7.4.0 lib/rubysmith/templates/%project_name%/spec/spec_helper.rb.erb
rubysmith-7.3.0 lib/rubysmith/templates/%project_name%/spec/spec_helper.rb.erb
rubysmith-7.2.0 lib/rubysmith/templates/%project_name%/spec/spec_helper.rb.erb
rubysmith-7.1.0 lib/rubysmith/templates/%project_name%/spec/spec_helper.rb.erb
rubysmith-7.0.0 lib/rubysmith/templates/%project_name%/spec/spec_helper.rb.erb