diff options
author | Rémy Coutable <remy@rymai.me> | 2018-03-29 12:47:54 +0300 |
---|---|---|
committer | Rémy Coutable <remy@rymai.me> | 2018-04-23 13:20:30 +0300 |
commit | 023d4f6f2f3d88d0966fe01e6ef921fd03a309fe (patch) | |
tree | 6aabb650fe2ba200222c57f1a4ac66ff0a9143e8 /spec/support/shared_examples/malicious_regexp_shared_examples.rb | |
parent | eb1cb7bed6951bdda54abd55e86fd793e6954a56 (diff) |
Move spec helpers/matchers/shared examples/contexts to their relevant folder
Signed-off-by: Rémy Coutable <remy@rymai.me>
Diffstat (limited to 'spec/support/shared_examples/malicious_regexp_shared_examples.rb')
-rw-r--r-- | spec/support/shared_examples/malicious_regexp_shared_examples.rb | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/spec/support/shared_examples/malicious_regexp_shared_examples.rb b/spec/support/shared_examples/malicious_regexp_shared_examples.rb new file mode 100644 index 00000000000..ac5d22298bb --- /dev/null +++ b/spec/support/shared_examples/malicious_regexp_shared_examples.rb @@ -0,0 +1,8 @@ +shared_examples 'malicious regexp' do + let(:malicious_text) { 'aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa!' } + let(:malicious_regexp) { '(?i)^(([a-z])+.)+[A-Z]([a-z])+$' } + + it 'takes under a second' do + expect { Timeout.timeout(1) { subject } }.not_to raise_error + end +end |