Add testing utilities and improve test coverage with FactoryBot integration

- Added `shoulda-matchers` for enhanced RSpec testing capabilities.
- Introduced `factory_bot_rails` for easier test data creation.
- Created factories for `HttpLogEntry`, `BlobEntry`, and `Domain::Fa::Post` models.
- Updated `rails_helper.rb` to include FactoryBot methods and configure Shoulda matchers.
- Enhanced `HttpLogEntry` model with a new `response_size` method.
- Refactored `justfile` to include parallel test execution.
- Improved `Gemfile` and `Gemfile.lock` with new testing gems.
This commit is contained in:
Dylan Knutson
2024-12-27 16:59:27 +00:00
parent d6ff5f2ebf
commit 5c1807711b
23 changed files with 1006 additions and 232 deletions

View File

@@ -15,3 +15,7 @@ format-all:
psql-dump-domain-fa-favs:
@psql -P pager=off -c 'select user_id, post_id, 1 from domain_fa_favs limit 10000000;' -d redux_prod -h 10.166.33.171 -U scraper_redux -t -A -F ' '
test:
RAILS_ENV=test bin/rails test
RAILS_ENV=test bin/rake parallel:spec