Created
December 22, 2024 11:20
-
-
Save romiras/c694d113f19e7b2090901235b75602e9 to your computer and use it in GitHub Desktop.
App boot RSpec test, including Sidekiq
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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