LoginSignup
0
0

More than 3 years have passed since last update.

Rails覚書

Last updated at Posted at 2020-11-17

便利メソッド

shuffle

要素をシャッフルしてくれる

[1] pry(main)> [1, 2, 3].shuffle
=> [2, 3, 1]
[2] pry(main)> [1, 2, 3].shuffle
=> [3, 2, 1]

rspec

Active Jobがキューされたかどうか

have_enqueued_job(XXX)
# 1回だけ
have_enqueued_job(XXX).exactly(1)
0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0