|
1 | | -# frozen_string_literal: true |
2 | | - |
3 | 1 | # Require this file for unit tests |
4 | 2 | Dir[File.join(File.expand_path('support', __dir__), '**/*.rb')].each { |file_name| require_relative file_name } |
5 | 3 |
|
6 | | -require 'ostruct' |
7 | 4 | require 'sidekiq' |
8 | 5 | require 'sidekiq/web' |
9 | 6 |
|
|
66 | 63 | allow(mock_redis).to receive(:sscan) { |key| mock_redis.common_scan(mock_redis.smembers(key), 0)[1] } |
67 | 64 | allow(Sidekiq).to receive(:redis).and_yield(mock_redis) |
68 | 65 | end |
69 | | - # The settings below are suggested to provide a good initial experience |
70 | | - # with RSpec, but feel free to customize to your heart's content. |
71 | | - # # These two settings work together to allow you to limit a spec run |
72 | | - # # to individual examples or groups you care about by tagging them with |
73 | | - # # `:focus` metadata. When nothing is tagged with `:focus`, all examples |
74 | | - # # get run. |
75 | | - # config.filter_run :focus |
76 | | - # config.run_all_when_everything_filtered = true |
77 | | - # |
78 | | - # # Allows RSpec to persist some state between runs in order to support |
79 | | - # # the `--only-failures` and `--next-failure` CLI options. We recommend |
80 | | - # # you configure your source control system to ignore this file. |
81 | | - # config.example_status_persistence_file_path = "spec/examples.txt" |
82 | | - # |
83 | | - # # Limits the available syntax to the non-monkey patched syntax that is |
84 | | - # # recommended. For more details, see: |
85 | | - # # - http://myronmars.to/n/dev-blog/2012/06/rspecs-new-expectation-syntax |
86 | | - # # - http://teaisaweso.me/blog/2013/05/27/rspecs-new-message-expectation-syntax/ |
87 | | - # # - http://myronmars.to/n/dev-blog/2014/05/notable-changes-in-rspec-3#new__config_option_to_disable_rspeccore_monkey_patching |
88 | | - # config.disable_monkey_patching! |
89 | | - # |
90 | | - # # This setting enables warnings. It's recommended, but in many cases may |
91 | | - # # be too noisy due to issues in dependencies. |
92 | | - # config.warnings = false |
93 | | - # |
94 | | - # # Many RSpec users commonly either run the entire suite or an individual |
95 | | - # # file, and it's useful to allow more verbose output when running an |
96 | | - # # individual spec file. |
97 | | - # if config.files_to_run.one? |
98 | | - # # Use the documentation formatter for detailed output, |
99 | | - # # unless a formatter has already been configured |
100 | | - # # (e.g. via a command-line flag). |
101 | | - # config.default_formatter = 'doc' |
102 | | - # end |
103 | | - # |
104 | | - # # Print the 10 slowest examples and example groups at the |
105 | | - # # end of the spec run, to help surface which specs are running |
106 | | - # # particularly slow. |
107 | | - # config.profile_examples = 10 |
108 | | - # |
109 | | - # # Run specs in random order to surface order dependencies. If you find an |
110 | | - # # order dependency and want to debug it, you can fix the order by providing |
111 | | - # # the seed, which is printed after each run. |
112 | | - # # --seed 1234 |
113 | | - # config.order = :random |
114 | | - # |
115 | | - # # Seed global randomization in this process using the `--seed` CLI option. |
116 | | - # # Setting this allows you to use `--seed` to deterministically reproduce |
117 | | - # # test failures related to randomization by passing the same `--seed` value |
118 | | - # # as the one that triggered the failure. |
119 | | - # Kernel.srand config.seed |
| 66 | +# The settings below are suggested to provide a good initial experience |
| 67 | +# with RSpec, but feel free to customize to your heart's content. |
| 68 | +=begin |
| 69 | + # These two settings work together to allow you to limit a spec run |
| 70 | + # to individual examples or groups you care about by tagging them with |
| 71 | + # `:focus` metadata. When nothing is tagged with `:focus`, all examples |
| 72 | + # get run. |
| 73 | + config.filter_run :focus |
| 74 | + config.run_all_when_everything_filtered = true |
| 75 | +
|
| 76 | + # Allows RSpec to persist some state between runs in order to support |
| 77 | + # the `--only-failures` and `--next-failure` CLI options. We recommend |
| 78 | + # you configure your source control system to ignore this file. |
| 79 | + config.example_status_persistence_file_path = "spec/examples.txt" |
| 80 | +
|
| 81 | + # Limits the available syntax to the non-monkey patched syntax that is |
| 82 | + # recommended. For more details, see: |
| 83 | + # - http://myronmars.to/n/dev-blog/2012/06/rspecs-new-expectation-syntax |
| 84 | + # - http://teaisaweso.me/blog/2013/05/27/rspecs-new-message-expectation-syntax/ |
| 85 | + # - http://myronmars.to/n/dev-blog/2014/05/notable-changes-in-rspec-3#new__config_option_to_disable_rspeccore_monkey_patching |
| 86 | + config.disable_monkey_patching! |
| 87 | +
|
| 88 | + # This setting enables warnings. It's recommended, but in many cases may |
| 89 | + # be too noisy due to issues in dependencies. |
| 90 | + config.warnings = false |
| 91 | +
|
| 92 | + # Many RSpec users commonly either run the entire suite or an individual |
| 93 | + # file, and it's useful to allow more verbose output when running an |
| 94 | + # individual spec file. |
| 95 | + if config.files_to_run.one? |
| 96 | + # Use the documentation formatter for detailed output, |
| 97 | + # unless a formatter has already been configured |
| 98 | + # (e.g. via a command-line flag). |
| 99 | + config.default_formatter = 'doc' |
| 100 | + end |
| 101 | +
|
| 102 | + # Print the 10 slowest examples and example groups at the |
| 103 | + # end of the spec run, to help surface which specs are running |
| 104 | + # particularly slow. |
| 105 | + config.profile_examples = 10 |
| 106 | +
|
| 107 | + # Run specs in random order to surface order dependencies. If you find an |
| 108 | + # order dependency and want to debug it, you can fix the order by providing |
| 109 | + # the seed, which is printed after each run. |
| 110 | + # --seed 1234 |
| 111 | + config.order = :random |
| 112 | +
|
| 113 | + # Seed global randomization in this process using the `--seed` CLI option. |
| 114 | + # Setting this allows you to use `--seed` to deterministically reproduce |
| 115 | + # test failures related to randomization by passing the same `--seed` value |
| 116 | + # as the one that triggered the failure. |
| 117 | + Kernel.srand config.seed |
| 118 | +=end |
120 | 119 | end |
0 commit comments