From 4f3fa8165a4f93fcdfe402ca118d63075bee286f Mon Sep 17 00:00:00 2001 From: Noah Durbin <13364668+noahdurbin@users.noreply.github.com> Date: Wed, 21 Aug 2024 20:32:21 -0600 Subject: [PATCH] feat: configure shoulda matchers and capybara --- Gemfile | 4 ++++ Gemfile.lock | 20 ++++++++++++++++++++ spec/rails_helper.rb | 9 +++++++++ 3 files changed, 33 insertions(+) diff --git a/Gemfile b/Gemfile index 392e490..60dc914 100644 --- a/Gemfile +++ b/Gemfile @@ -49,3 +49,7 @@ end gem "rspec-rails", "~> 6.1" gem "simplecov", "~> 0.22.0" + +gem "capybara", "~> 3.40" + +gem "shoulda-matchers", "~> 6.4" diff --git a/Gemfile.lock b/Gemfile.lock index b2222e8..ff1158d 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -75,11 +75,22 @@ GEM minitest (>= 5.1) mutex_m tzinfo (~> 2.0) + addressable (2.8.7) + public_suffix (>= 2.0.2, < 7.0) base64 (0.2.0) bigdecimal (3.1.8) bootsnap (1.18.4) msgpack (~> 1.2) builder (3.3.0) + capybara (3.40.0) + addressable + matrix + mini_mime (>= 0.1.3) + nokogiri (~> 1.11) + rack (>= 1.6.0) + rack-test (>= 0.6.3) + regexp_parser (>= 1.5, < 3.0) + xpath (~> 3.2) concurrent-ruby (1.3.4) connection_pool (2.4.1) crass (1.0.6) @@ -108,6 +119,7 @@ GEM net-pop net-smtp marcel (1.0.4) + matrix (0.4.2) mini_mime (1.1.5) minitest (5.25.1) msgpack (1.7.2) @@ -137,6 +149,7 @@ GEM pg (1.5.7) psych (5.1.2) stringio + public_suffix (6.0.1) puma (6.4.2) nio4r (~> 2.0) racc (1.8.1) @@ -180,6 +193,7 @@ GEM rake (13.2.1) rdoc (6.7.0) psych (>= 4.0.0) + regexp_parser (2.9.2) reline (0.5.9) io-console (~> 0.5) rspec-core (3.13.0) @@ -199,6 +213,8 @@ GEM rspec-mocks (~> 3.13) rspec-support (~> 3.13) rspec-support (3.13.1) + shoulda-matchers (6.4.0) + activesupport (>= 5.2.0) simplecov (0.22.0) docile (~> 1.1) simplecov-html (~> 0.11) @@ -214,6 +230,8 @@ GEM websocket-driver (0.7.6) websocket-extensions (>= 0.1.0) websocket-extensions (0.1.5) + xpath (3.2.0) + nokogiri (~> 1.8) zeitwerk (2.6.17) PLATFORMS @@ -226,11 +244,13 @@ PLATFORMS DEPENDENCIES bootsnap + capybara (~> 3.40) debug pg (~> 1.1) puma (>= 5.0) rails (~> 7.1.3, >= 7.1.3.4) rspec-rails (~> 6.1) + shoulda-matchers (~> 6.4) simplecov (~> 0.22.0) tzinfo-data diff --git a/spec/rails_helper.rb b/spec/rails_helper.rb index 7ba94a2..87d20f2 100644 --- a/spec/rails_helper.rb +++ b/spec/rails_helper.rb @@ -64,3 +64,12 @@ # arbitrary gems may also be filtered via: # config.filter_gems_from_backtrace("gem name") end + +require 'shoulda/matchers' + +Shoulda::Matchers.configure do |config| + config.integrate do |with| + with.test_framework :rspec + with.library :rails + end +end