LoginSignup
0

More than 1 year has passed since last update.

#Rspec でタグを指定しないテストの before after の挙動を設定する

Last updated at Posted at 2019-08-16

Set the before and after behavior of tests that do not specify tags with #Rspec

some_tag が無指定の場合の after の挙動を設定する例

  config.after :each do |example|
    unless example.metadata[:some_tag]
      some_thing
    end
  end

Original by Github issue

チャットメンバー募集

何か質問、悩み事、相談などあればLINEオープンチャットもご利用ください。

Twitter

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