| 1 |
|
| 2 |
|
| 3 |
require "re2" |
| 4 |
|
| 5 |
|
| 6 |
class StringLike |
| 7 |
attr_reader :str |
| 8 |
alias_method :to_str, :str |
| 9 |
|
| 10 |
def initialize(str) |
| 11 |
@str = str |
| 12 |
end |
| 13 |
end |
| 14 |
|
| 15 |
RSpec.configure do |config| |
| 16 |
config.expect_with :rspec do |expectations| |
| 17 |
expectations.include_chain_clauses_in_custom_matcher_descriptions = true |
| 18 |
end |
| 19 |
|
| 20 |
config.mock_with :rspec do |mocks| |
| 21 |
mocks.verify_partial_doubles = true |
| 22 |
end |
| 23 |
|
| 24 |
config.filter_run :focus |
| 25 |
config.run_all_when_everything_filtered = true |
| 26 |
config.disable_monkey_patching! |
| 27 |
config.warnings = true |
| 28 |
config.default_formatter = 'doc' if config.files_to_run.one? |
| 29 |
config.order = :random |
| 30 |
Kernel.srand config.seed |
| •31 |
|
| 32 |
if RUBY_PLATFORM.include?("s390x") |
| 33 |
config.around(:each) do |example| |
| 34 |
if example.metadata[:description] == "supports GC compaction" |
| 35 |
skip "GC.compact hangs intermittently on s390x (Debian #1142853)" |
| 36 |
else |
| 37 |
example.run |
| 38 |
end |
| 39 |
end |
| 40 |
end |
| 41 |
end |