maeshimaの日記

メモ書きです

2008-10-01から1ヶ月間の記事一覧

ルーティング関連のrspec

こんな風にテストする。 route_for(:controller => "hoge", :action => "index").should == "/hoge" params_from(:get, "/blogs").should == {:controller => "blogs", :action => "index"} named_root(hoge_urlとか)には対応してないのかな?

for in

for(a in hoge) のaには数値が入る

rspec

いつの間にかrspecがgitに移行してた。 rspec_on_railsがrspec-railsに名称変更してた。 今日rspecではまったところ rspec内のresponse.should redirect_to()は:action => :indexの形式だとなぜかエラー。hoge_urlだとOK。理由は不明。

ルーティング

変更したら一回mongrelを再起動させた方がいい