Update Rspec syntax
Did this with the help of the transpec gem. Contrary to the README, I
found I did need to add it to the Gemfile (although obviously, I removed
it immediately afterwards).
Additionally it crashed trying to open `.git/COMMIT_EDITMSG` after the
conversion had completed, because I was running it from inside a
submodule; upstream issue for that:
https://github.com/yujinakayama/transpec/issues/94
Here are the relevant bits of the output:
Summary:
415 conversions
from: obj.should
to: expect(obj).to
382 conversions
from: == expected
to: eq(expected)
100 conversions
from: lambda { }.should
to: expect { }.to
35 conversions
from: obj.should_not
to: expect(obj).not_to
32 conversions
from: lambda { }.should_not
to: expect { }.not_to
2 conversions
from: it { should_not ... }
to: it { is_expected.not_to ... }
1 conversion
from: it { should ... }
to: it { is_expected.to ... }
967 conversions, 0 incompletes, 0 warnings, 0 errors
Sure beats doing it by hand, or even with Vim macros...
21 files changed: