Rspec
RspecでControllerをテストする際、flashに値を渡す方法のメモ <背景> 以下のような、flashの値で分岐処理しているactionをテストしたい def my_action if flash[:something].nil? @hoge = flash[:something] end end <結論> specにて、FlashHashクラスを…
RspecでControllerをテストする際、flashに値を渡す方法のメモ <背景> 以下のような、flashの値で分岐処理しているactionをテストしたい def my_action if flash[:something].nil? @hoge = flash[:something] end end <結論> specにて、FlashHashクラスを…