Skip to content

Commit

Permalink
factory bot gem added
Browse files Browse the repository at this point in the history
  • Loading branch information
alex223125 committed Sep 14, 2022
1 parent fdd2e65 commit 91dd071
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 1 deletion.
1 change: 1 addition & 0 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ group :development, :test do
gem 'byebug', platforms: [:mri, :mingw, :x64_mingw]
gem 'pry', '~> 0.13.1'
gem 'rspec-rails', '~> 4.0.2'
gem 'factory_bot_rails', '~> 6.1.0'
end

group :development do
Expand Down
6 changes: 6 additions & 0 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,11 @@ GEM
crass (1.0.6)
diff-lcs (1.4.4)
erubi (1.10.0)
factory_bot (6.1.0)
activesupport (>= 5.0.0)
factory_bot_rails (6.1.0)
factory_bot (~> 6.1.0)
railties (>= 5.0.0)
ffi (1.14.2)
globalid (0.4.2)
activesupport (>= 4.2.0)
Expand Down Expand Up @@ -192,6 +197,7 @@ DEPENDENCIES
bcrypt
bootsnap (>= 1.4.4)
byebug
factory_bot_rails (~> 6.1.0)
jsonapi.rb
jwt
listen (~> 3.3)
Expand Down
2 changes: 1 addition & 1 deletion spec/rails_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
# directory. Alternatively, in the individual `*_spec.rb` files, manually
# require only the support files necessary.
#
# Dir[Rails.root.join('spec', 'support', '**', '*.rb')].sort.each { |f| require f }
Dir[Rails.root.join('spec', 'support', '**', '*.rb')].sort.each { |f| require f }

# Checks for pending migrations and applies them before tests are run.
# If you are not using ActiveRecord, you can remove these lines.
Expand Down
3 changes: 3 additions & 0 deletions spec/support/factory_bot.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
RSpec.configure do |config|
config.include FactoryBot::Syntax::Methods
end

0 comments on commit 91dd071

Please sign in to comment.