Last Updated: February 25, 2016
· Alexandr K

vim regexp for replacing rspec 'should' style with 'expect().to' for eq example.

Replace Pattern:


Before: == 'value'


expect( eq('value')

3 Responses
Add your response

I'm not quite sure why the expect syntax is that much better. eq 'value' seems much more readable. I would love to hear from you why you use 'expect'.

over 1 year ago ·

As for me it's more readable like a sentence. I think it depends on a developer anyway.

over 1 year ago ·

I think the point is to eliminate 'should'. One less syntax sugar

over 1 year ago ·