See: https://github.com/rspec/rspec-expectations/blob/9febc53557ccec50bd2549b3bedc77e94b603a2b/spec/rspec/expectations/configuration_spec.rb

Here we disable and enable syntaxes for testing, but make sure to reset them to their original values afterwards. For additional bonus points you could use the `in_sub_process do ... end` helpers to isolate this from the main RSpec process entirely, and then you have less cleanup to worry about.