🖥

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

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

https://github.com/YumaInaura/YumaInaura/issues/2294

チャットメンバー募集

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

https://line.me/ti/g2/eEPltQ6Tzh3pYAZV8JXKZqc7PJ6L0rpm573dcQ

Twitter

https://twitter.com/YumaInaura

公開日時

2019-08-16

Discussion