Sha256: bbc3b0ce9cf2be0bb4210c84557db55a914d142f1c589658635402996e897b19

Contents?: true

Size: 1.35 KB

Versions: 3

Compression:

Stored size: 1.35 KB

Contents

require "bundler/setup"
Bundler.require :tools

<% if configuration.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 %>

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

<% if configuration.build_refinements %>
using Refinements::Pathnames

Pathname.require_tree __dir__, "support/shared_contexts/**/*.rb"
<% else %>

Dir[File.join(__dir__, "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.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

3 entries across 3 versions & 1 rubygems

Version Path
rubysmith-4.3.0 lib/rubysmith/templates/%project_name%/spec/spec_helper.rb.erb
rubysmith-4.2.0 lib/rubysmith/templates/%project_name%/spec/spec_helper.rb.erb
rubysmith-4.1.0 lib/rubysmith/templates/%project_name%/spec/spec_helper.rb.erb