Skip to content

Latest commit

 

History

History
21 lines (13 loc) · 499 Bytes

extractrspeclet.md

File metadata and controls

21 lines (13 loc) · 499 Bytes

ExtractRSpecLet

Today I got to see the :ExtractRspecLet command from the vim-weefactor plugin. It does what the names suggests, converting this:

# spec/model/foobar_spec.rb

foo = FactoryGirl.create :foobar

To this:

# spec/model/foobar_spec.rb

let(:foo) { FactoryGirl.create :foobar }

It also moved the new let from inside my it block to right underneath my context block. Awesome!

h/t Josh Davey and Dillon Hafer