ctrl+shift+p filters: :st2 :st3 :win :osx :linux
Browse

Factory​Girl

by traviskroberts ST2/ST3

FactoryGirl Snippets for Sublime Text 2/3

Labels snippets

Details

Installs

  • Total 511
  • Win 61
  • OS X 308
  • Linux 142
Dec 15 Dec 14 Dec 13 Dec 12 Dec 11 Dec 10 Dec 9 Dec 8 Dec 7 Dec 6 Dec 5 Dec 4 Dec 3 Dec 2 Dec 1 Nov 30 Nov 29 Nov 28 Nov 27 Nov 26 Nov 25 Nov 24 Nov 23 Nov 22 Nov 21 Nov 20 Nov 19 Nov 18 Nov 17 Nov 16 Nov 15 Nov 14 Nov 13 Nov 12 Nov 11 Nov 10 Nov 9 Nov 8 Nov 7 Nov 6 Nov 5 Nov 4 Nov 3 Nov 2 Nov 1
Windows 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
OS X 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0
Linux 0 0 0 1 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0

Readme

Source
raw.​githubusercontent.​com

FactoryGirl Snippets for Sublime Text 2/3

Included Snippets

fac -> factory :name, :class, :parent, :aliases do ... end

seq -> sequence(:attribute, initial value) { |n| "#{n}" }

fgaf -> attributes_for(:model, attributes)

fgc -> create(:model, attributes)

fgcl -> create_list(:model, 3, attributes)

fgb -> build(:model, attributes)

fgbs -> build_stubbed(:model, attributes)

fgbl -> build_list(:model, 3, attributes)

after -> after(:create|:build|:stub) { |resource| ... }

before -> before(:create) { |resource| ... }