开发者

Getting "undefined method" error on form select in cucumber

I'm trying to visit a page with cucumber, with:

visit new_video_path

but I get this error:

undefined method `开发者_JAVA百科episode_id' for #<Video:0x22df8dc> (ActionView::TemplateError)
On line #19 of app/views/videos/_form.html.erb
...
19:     <%= select(:video, :episode_id, @episodes.collect {|e| [ e.title, e.id ] }, { :include_blank => true }) %>

It loads fine in the browser, and the form processes fine too.

What did I do wrong?


Ah, found the problem. I forgot to migrate the test database.

rake db:migrate RAILS_ENV=test
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜