enable some RSpec options (randomised tests and some other QoL things)

This commit is contained in:
Georg Gadinger 2023-01-06 13:59:41 +01:00
parent 5c4ab05d4e
commit e8a5bd50b2
1 changed files with 46 additions and 46 deletions

View File

@ -52,51 +52,51 @@ RSpec.configure do |config|
# triggering implicit auto-inclusion in groups with matching metadata. # triggering implicit auto-inclusion in groups with matching metadata.
config.shared_context_metadata_behavior = :apply_to_host_groups config.shared_context_metadata_behavior = :apply_to_host_groups
# The settings below are suggested to provide a good initial experience # This allows you to limit a spec run to individual examples or groups
# with RSpec, but feel free to customize to your heart's content. # you care about by tagging them with `:focus` metadata. When nothing
# # This allows you to limit a spec run to individual examples or groups # is tagged with `:focus`, all examples get run. RSpec also provides
# # you care about by tagging them with `:focus` metadata. When nothing # aliases for `it`, `describe`, and `context` that include `:focus`
# # is tagged with `:focus`, all examples get run. RSpec also provides # metadata: `fit`, `fdescribe` and `fcontext`, respectively.
# # aliases for `it`, `describe`, and `context` that include `:focus` config.filter_run_when_matching :focus
# # metadata: `fit`, `fdescribe` and `fcontext`, respectively.
# config.filter_run_when_matching :focus # Allows RSpec to persist some state between runs in order to support
# # the `--only-failures` and `--next-failure` CLI options. We recommend
# # Allows RSpec to persist some state between runs in order to support # you configure your source control system to ignore this file.
# # the `--only-failures` and `--next-failure` CLI options. We recommend
# # you configure your source control system to ignore this file.
config.example_status_persistence_file_path = "spec/examples.txt" config.example_status_persistence_file_path = "spec/examples.txt"
#
# # Limits the available syntax to the non-monkey patched syntax that is # Limits the available syntax to the non-monkey patched syntax that is
# # recommended. For more details, see: # recommended. For more details, see:
# # - http://rspec.info/blog/2012/06/rspecs-new-expectation-syntax/ # https://relishapp.com/rspec/rspec-core/docs/configuration/zero-monkey-patching-mode
# # - http://www.teaisaweso.me/blog/2013/05/27/rspecs-new-message-expectation-syntax/ # config.disable_monkey_patching!
# # - http://rspec.info/blog/2014/05/notable-changes-in-rspec-3/#zero-monkey-patching-mode
# config.disable_monkey_patching! # This setting enables warnings. It's recommended, but in some cases may
# # be too noisy due to issues in dependencies.
# # Many RSpec users commonly either run the entire suite or an individual # config.warnings = true
# # file, and it's useful to allow more verbose output when running an
# # individual spec file. # Many RSpec users commonly either run the entire suite or an individual
# if config.files_to_run.one? # file, and it's useful to allow more verbose output when running an
# # Use the documentation formatter for detailed output, # individual spec file.
# # unless a formatter has already been configured if config.files_to_run.one?
# # (e.g. via a command-line flag). # Use the documentation formatter for detailed output,
# config.default_formatter = 'doc' # unless a formatter has already been configured
# end # (e.g. via a command-line flag).
# config.default_formatter = "doc"
# # Print the 10 slowest examples and example groups at the end
# # end of the spec run, to help surface which specs are running
# # particularly slow. # Print the 10 slowest examples and example groups at the
# config.profile_examples = 10 # end of the spec run, to help surface which specs are running
# # particularly slow.
# # Run specs in random order to surface order dependencies. If you find an # config.profile_examples = 10
# # order dependency and want to debug it, you can fix the order by providing
# # the seed, which is printed after each run. # Run specs in random order to surface order dependencies. If you find an
# # --seed 1234 # order dependency and want to debug it, you can fix the order by providing
# config.order = :random # the seed, which is printed after each run.
# # --seed 1234
# # Seed global randomization in this process using the `--seed` CLI option. config.order = :random
# # Setting this allows you to use `--seed` to deterministically reproduce
# # test failures related to randomization by passing the same `--seed` value # Seed global randomization in this process using the `--seed` CLI option.
# # as the one that triggered the failure. # Setting this allows you to use `--seed` to deterministically reproduce
# Kernel.srand config.seed # test failures related to randomization by passing the same `--seed` value
# as the one that triggered the failure.
Kernel.srand config.seed
end end