if RUBY_ENGINE == "ruby" require "codeclimate-test-reporter" CodeClimate::TestReporter.start SimpleCov.start do add_filter "/spec/" end end begin require "byebug" rescue LoadError; end require "dry-matcher" Dir[File.join(File.dirname(__FILE__), "support/**/*.rb")].each do |f| require f end RSpec.configure do |config| config.disable_monkey_patching! config.expect_with :rspec do |expectations| # This option will default to `true` in RSpec 4. expectations.include_chain_clauses_in_custom_matcher_descriptions = true end config.mock_with :rspec do |mocks| # This option will default to `true` in RSpec 4. mocks.verify_partial_doubles = true end # Allows RSpec to persist some state between runs in order to support # 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" # This setting enables warnings. It's recommended, but in some cases may # be too noisy due to issues in dependencies. config.warnings = true # 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 # 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