プログラミング 美徳の不幸

Ruby, Rails, JavaScriptなどのプログラミングまとめ、解説、備忘録。

2013-05-25から1日間の記事一覧

controller specその2

問題 つぎのうち意図しない動きをするspecはどれでしょう? context 'question1' do subject { get :new } it { expect(assigns(:hoge)).to be_new_record } #A it { should render_template('new') } #B end context 'question2' do subject { response } b…