Fix spec
This commit is contained in:
parent
8ed169577d
commit
550b149854
1 changed files with 5 additions and 1 deletions
|
@ -13,7 +13,11 @@ RSpec.describe Mutant::AST::Regexp, '.parse' do
|
|||
|
||||
context 'on regexp regexp_parser does not accept' do
|
||||
it 'returns nil' do
|
||||
expect(apply(/u{/)).to be(nil)
|
||||
if Regexp::Parser::VERSION >= '1.7.1'
|
||||
expect(apply(/u{/).to_re).to eql(/u{/)
|
||||
else
|
||||
expect(apply(/u{/)).to be(nil)
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Reference in a new issue