1
0
Fork 0

Use FactoryBot

This commit is contained in:
Alex Kotov 2018-11-23 01:26:40 +05:00
parent 1c80c5be0a
commit f5c95f7de6
No known key found for this signature in database
GPG Key ID: 4E831250F47DE154
3 changed files with 14 additions and 0 deletions

View File

@ -48,6 +48,9 @@ gem 'bootsnap', '>= 1.1.0', require: false
gem 'pry-rails', '~> 0.3'
group :development, :test do
# factory_bot provides a framework and DSL for defining and using factories.
gem 'factory_bot_rails', '~> 4.10'
# Faker is used to easily generate fake data:
# names, addresses, phone numbers, etc.
gem 'faker', '~> 1.8'

View File

@ -56,6 +56,11 @@ GEM
docile (1.3.1)
erubi (1.7.1)
execjs (2.7.0)
factory_bot (4.11.1)
activesupport (>= 3.0.0)
factory_bot_rails (4.11.1)
factory_bot (~> 4.11.1)
railties (>= 3.0.0)
faker (1.9.1)
i18n (>= 0.7)
ffi (1.9.25)
@ -209,6 +214,7 @@ PLATFORMS
DEPENDENCIES
bootsnap (>= 1.1.0)
byebug
factory_bot_rails (~> 4.10)
faker (~> 1.8)
listen (>= 3.0.5, < 3.2)
pg (>= 0.18, < 2.0)

View File

@ -0,0 +1,5 @@
# frozen_string_literal: true
RSpec.configure do |config|
config.include FactoryBot::Syntax::Methods
end