diff --git a/Gemfile b/Gemfile index ea617a9..43ab3d5 100644 --- a/Gemfile +++ b/Gemfile @@ -2,49 +2,16 @@ source "https://rubygems.org" git_source(:github) { |repo| "https://github.com/#{repo}.git" } ruby "3.1.1" - -# Bundle edge Rails instead: gem "rails", github: "rails/rails", branch: "main" gem "rails", "~> 7.0.2", ">= 7.0.2.2" - -# Use postgresql as the database for Active Record gem "pg", "~> 1.1" - -# Use the Puma web server [https://github.com/puma/puma] gem "puma", "~> 5.0" -# Build JSON APIs with ease [https://github.com/rails/jbuilder] -# gem "jbuilder" - -# Use Redis adapter to run Action Cable in production -# gem "redis", "~> 4.0" - -# Use Kredis to get higher-level data types in Redis [https://github.com/rails/kredis] -# gem "kredis" - -# Use Active Model has_secure_password [https://guides.rubyonrails.org/active_model_basics.html#securepassword] -# gem "bcrypt", "~> 3.1.7" - -# Windows does not include zoneinfo files, so bundle the tzinfo-data gem -gem "tzinfo-data", platforms: %i[ mingw mswin x64_mingw jruby ] - -# Reduces boot times through caching; required in config/boot.rb gem "bootsnap", require: false -# Use Active Storage variants [https://guides.rubyonrails.org/active_storage_overview.html#transforming-images] -# gem "image_processing", "~> 1.2" - -# Use Rack CORS for handling Cross-Origin Resource Sharing (CORS), making cross-origin AJAX possible -# gem "rack-cors" - group :development, :test do - # See https://guides.rubyonrails.org/debugging_rails_applications.html#debugging-with-the-debug-gem gem "debug", platforms: %i[ mri mingw x64_mingw ] + + gem "rspec-rails", "~> 5.1" + gem "factory_bot_rails", "~> 6.2" + gem "shoulda-matchers", "~> 5.1" end - -group :development do - # Speed up commands on slow machines / big apps [https://github.com/rails/spring] - # gem "spring" -end - - -gem "rspec-rails", "~> 5.1" diff --git a/Gemfile.lock b/Gemfile.lock index 07139c4..dadd9d3 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -77,6 +77,11 @@ GEM diff-lcs (1.5.0) digest (3.1.0) erubi (1.10.0) + factory_bot (6.2.0) + activesupport (>= 5.0.0) + factory_bot_rails (6.2.0) + factory_bot (~> 6.2.0) + railties (>= 5.0.0) globalid (1.0.0) activesupport (>= 5.0) i18n (1.10.0) @@ -166,6 +171,8 @@ GEM rspec-mocks (~> 3.10) rspec-support (~> 3.10) rspec-support (3.11.0) + shoulda-matchers (5.1.0) + activesupport (>= 5.2.0) strscan (3.0.1) thor (1.2.1) timeout (0.2.0) @@ -182,11 +189,12 @@ PLATFORMS DEPENDENCIES bootsnap debug + factory_bot_rails (~> 6.2) pg (~> 1.1) puma (~> 5.0) rails (~> 7.0.2, >= 7.0.2.2) rspec-rails (~> 5.1) - tzinfo-data + shoulda-matchers (~> 5.1) RUBY VERSION ruby 3.1.1p18 diff --git a/spec/rails_helper.rb b/spec/rails_helper.rb index b6317b5..c0c0dcc 100644 --- a/spec/rails_helper.rb +++ b/spec/rails_helper.rb @@ -62,3 +62,10 @@ RSpec.configure do |config| # arbitrary gems may also be filtered via: # config.filter_gems_from_backtrace("gem name") end + +Shoulda::Matchers.configure do |config| + config.integrate do |with| + with.test_framework :rspec + with.library :rails + end +end