lib/bently/recipe/factory-girl-rails.rb in bently-1.0.0 vs lib/bently/recipe/factory-girl-rails.rb in bently-1.0.1
- old
+ new
@@ -1,38 +1,18 @@
module Bently
class FactoryGirlRails < RailsRecipe
- name 'factory_girl_rails'
+ title 'factory_girl_rails'
category 'gem'
description 'downloads and installs factory_girl_rails gem'
homepage 'https://github.com/thoughtbot/factory_girl_rails/blob/master/README.md'
def initialize
gem_group :test do
gem "factory_girl_rails", "~> 4.0"
end
bundle
- create './spec/factories.rb', factory_file
- end
-
- protected
-
- def factory_file
- %{# # This will guess the User class
- # FactoryGirl.define do
- # factory :user do
- # first_name "John"
- # last_name "Doe"
- # admin false
- # end
- #
- # # This will use the User class (Admin would have been guessed)
- # factory :admin, class: User do
- # first_name "Admin"
- # last_name "User"
- # admin true
- # end
- # end}
+ create './spec/factories.rb', template('factories.rb')
end
end
end