Skip to content

Instantly share code, notes, and snippets.

@xinyifly
Last active April 26, 2019 04:35
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save xinyifly/30755ef9102c68d3e1aa564574844703 to your computer and use it in GitHub Desktop.
Save xinyifly/30755ef9102c68d3e1aa564574844703 to your computer and use it in GitHub Desktop.
inject_into_file 'Gemfile', after: "group :development, :test do\n" do <<-'RUBY'
gem 'faker', '~> 1.9'
RUBY
end
inject_into_file 'Gemfile', after: "group :development, :test do\n" do <<-'RUBY'
gem 'factory_bot_rails', '~> 5.0'
RUBY
end
inject_into_file 'test/test_helper.rb', after: "class ActiveSupport::TestCase\n" do <<-'RUBY'
include FactoryBot::Syntax::Methods
RUBY
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment