Sha256: d7a5c619cf3b31b8c1894947a8ed9b2c6c28dd17c51822edb010b198f98b8fb6
Contents?: true
Size: 552 Bytes
Versions: 6
Compression:
Stored size: 552 Bytes
Contents
require 'spec_helper' describe 'EcmaRe' do it 'should fail if input is not a string or regexp' do re = 92 expect(EcmaReValidator.valid?(re)).to eql(false) end it 'should fail if string is not resolvable' do re = '(\w' expect(EcmaReValidator.valid?(re)).to eql(false) end it 'passes for a valid regexp string' do re = "[Ss]mith\\\\b" expect(EcmaReValidator.valid?(re)).to eql(true) end it 'passes for a valid regexp' do re = /[Ss]mith\\\\b/ expect(EcmaReValidator.valid?(re)).to eql(true) end end
Version data entries
6 entries across 6 versions & 1 rubygems