spec/spec_helper.rb in curation_concerns-1.4.0 vs spec/spec_helper.rb in curation_concerns-1.5.0
- old
+ new
@@ -91,19 +91,63 @@
config.before(:each, type: :helper) { initialize_controller_helpers(helper) }
config.include(ControllerLevelHelpers, type: :view)
config.before(:each, type: :view) { initialize_controller_helpers(view) }
+ config.include BackportTest, type: :controller unless Rails.version > '5'
config.include Controllers::EngineHelpers, type: :controller
config.include Controllers::EngineHelpers, type: :helper
config.include ::Rails.application.routes.url_helpers
config.include Rails.application.routes.url_helpers, type: :routing
config.include Capybara::DSL
config.include InputSupport, type: :input
config.include Capybara::RSpecMatchers, type: :input
config.infer_spec_type_from_file_location!
config.deprecation_stream
+
+ config.expect_with :rspec do |expectations|
+ expectations.include_chain_clauses_in_custom_matcher_descriptions = true
+ end
+
+ config.default_formatter = 'doc' if config.files_to_run.one?
+
+ config.shared_context_metadata_behavior = :apply_to_host_groups
+
+ # This allows you to limit a spec run to individual examples or groups
+ # you care about by tagging them with `:focus` metadata. When nothing
+ # is tagged with `:focus`, all examples get run. RSpec also provides
+ # aliases for `it`, `describe`, and `context` that include `:focus`
+ # metadata: `fit`, `fdescribe` and `fcontext`, respectively.
+ config.filter_run_when_matching :focus
+
+ config.example_status_persistence_file_path = 'spec/examples.txt'
+ # Many RSpec users commonly either run the entire suite or an individual
+ # file, and it's useful to allow more verbose output when running an
+ # individual spec file.
+ if config.files_to_run.one?
+ # Use the documentation formatter for detailed output,
+ # unless a formatter has already been configured
+ # (e.g. via a command-line flag).
+ config.default_formatter = 'doc'
+ end
+
+ # Print the 10 slowest examples and example groups at the
+ # end of the spec run, to help surface which specs are running
+ # particularly slow.
+ config.profile_examples = 10
+
+ # Run specs in random order to surface order dependencies. If you find an
+ # order dependency and want to debug it, you can fix the order by providing
+ # the seed, which is printed after each run.
+ # --seed 1234
+ config.order = :random
+
+ # Seed global randomization in this process using the `--seed` CLI option.
+ # Setting this allows you to use `--seed` to deterministically reproduce
+ # test failures related to randomization by passing the same `--seed` value
+ # as the one that triggered the failure.
+ Kernel.srand config.seed
end
if defined?(ClamAV)
ClamAV.instance.loaddb
else