views:

104

answers:

1

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

visit new_video_path

but I get this error:

undefined method `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?

A: 

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

rake db:migrate RAILS_ENV=test
zlog