Skip to content

Instantly share code, notes, and snippets.

@romiras
Created December 22, 2024 11:20
Show Gist options
  • Save romiras/c694d113f19e7b2090901235b75602e9 to your computer and use it in GitHub Desktop.
Save romiras/c694d113f19e7b2090901235b75602e9 to your computer and use it in GitHub Desktop.
App boot RSpec test, including Sidekiq
require 'rails_helper'
RSpec.describe "your favorite app" do
it 'boots' do
assert_nil Rails.application.eager_load!
end
context 'sidekiq server' do
it 'boots too!' do
allow(Sidekiq).to receive(:server?).and_return true
allow(Sidekiq::Throttled).to receive(:setup!)
require_relative '../config/initializers/sidekiq'
assert true # just make sure it loads
end
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment