LoginSignup
1
0

More than 5 years have passed since last update.

Rails/RSpec でテスト対象に応じて Log Level を切り替える

Posted at
  • 全体で RSpec を流したい時は config.log_level = :warn
  • コケた Spec を単独で流したい時は config.log_level = :debug

としたい時、

config.log_level = ARGV.length > 0 ? :debug : :warn

とすると切り替えできる。

1
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
1
0