Skip to content

Instantly share code, notes, and snippets.

View cmolina's full-sized avatar
🔥
This is fine 🔥

Carlos Molina A cmolina

🔥
This is fine 🔥
View GitHub Profile
@cmolina
cmolina / test_system.rake
Created December 17, 2023 03:59
Sharding for Rails system tests
namespace :test do
namespace :system do
# Run `rails test:system` split into N shards
#
# @example run the first fifth of the tests
# $ rake test:system:shard\['1/5'\]
desc 'Run system tests in shards'
task :shard, [:shard] => [:environment] do |_, args|
tests = Rake::FileList['test/system/**/*_test.rb']