shared_examples'malicious regexp'dolet(:malicious_text){'aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa!'}let(:malicious_regexp){'(?i)^(([a-z])+.)+[A-Z]([a-z])+$'}it'takes under a second'doexpect{Timeout.timeout(1){subject}}.not_toraise_errorendend