Qiita Teams that are logged in
You are not logged in to any team

Log in to Qiita Team
Community
OrganizationAdvent CalendarQiitadon (β)
Service
Qiita JobsQiita ZineQiita Blog
Help us understand the problem. What is going on with this article?

sidekiq,test,Rspec memo

More than 3 years have passed since last update.

Gemfileに下記を追記

group :test do
  gem 'rspec-sidekiq'
end

specファイルを作ろう

spec/workers/xxx_spec.rb

require 'rails_helper'

describe Xxx do
 before do
   subject.perform
 end

 it "Process in" do
   expect be_processed_in(:yy)
 end

end

手動デバッグ

bundle exec sidekiq -q [:queue] RAILS_ENV=development
wroc
Why not register and get more from Qiita?
  1. We will deliver articles that match you
    By following users and tags, you can catch up information on technical fields that you are interested in as a whole
  2. you can read useful information later efficiently
    By "stocking" the articles you like, you can search right away