|
3 | 3 | SimpleCov.start
|
4 | 4 | end
|
5 | 5 |
|
| 6 | +require "pry-byebug" |
6 | 7 | require_relative "support/commit_message_helper"
|
7 | 8 | require_relative "support/fake_file"
|
8 | 9 | require_relative "support/output_helper"
|
9 | 10 | require_relative "support/matchers/exit_code_matchers"
|
10 | 11 |
|
11 | 12 | RSpec.configure do |config|
|
12 |
| - config.run_all_when_everything_filtered = true |
13 |
| - config.filter_run :focus |
| 13 | + config.expect_with :rspec do |expectations| |
| 14 | + # This option will default to `true` in RSpec 4. It makes the `description` |
| 15 | + # and `failure_message` of custom matchers include text for helper methods |
| 16 | + # defined using `chain`, e.g.: |
| 17 | + # be_bigger_than(2).and_smaller_than(4).description |
| 18 | + # # => "be bigger than 2 and smaller than 4" |
| 19 | + # ...rather than: |
| 20 | + # # => "be bigger than 2" |
| 21 | + expectations.include_chain_clauses_in_custom_matcher_descriptions = true |
| 22 | + end |
| 23 | + |
| 24 | + config.mock_with :rspec do |mocks| |
| 25 | + # Prevents you from mocking or stubbing a method that does not exist on |
| 26 | + # a real object. This is generally recommended, and will default to |
| 27 | + # `true` in RSpec 4. |
| 28 | + mocks.verify_partial_doubles = true |
| 29 | + end |
| 30 | + |
| 31 | + # This option will default to `:apply_to_host_groups` in RSpec 4 (and will |
| 32 | + # have no way to turn it off -- the option exists only for backwards |
| 33 | + # compatibility in RSpec 3). It causes shared context metadata to be |
| 34 | + # inherited by the metadata hash of host groups and examples, rather than |
| 35 | + # triggering implicit auto-inclusion in groups with matching metadata. |
| 36 | + config.shared_context_metadata_behavior = :apply_to_host_groups |
| 37 | + config.filter_run_when_matching :focus |
| 38 | + config.example_status_persistence_file_path = "spec/rspec-status.txt" |
| 39 | + config.disable_monkey_patching! |
| 40 | + config.warnings = true |
| 41 | + |
| 42 | + if config.files_to_run.one? |
| 43 | + config.default_formatter = "doc" |
| 44 | + end |
| 45 | + # config.profile_examples = 10 |
| 46 | + config.order = :random |
| 47 | + Kernel.srand(config.seed) |
14 | 48 | end
|
0 commit comments