Rspec Faker has_one fail in view

Posted by Victor Martins on Stack Overflow See other posts from Stack Overflow or by Victor Martins
Published on 2010-03-09T00:57:49Z Indexed on 2010/03/09 1:06 UTC
Read the original article Hit count: 334

Filed under:
|

I' trying to fix this for hours...

I have this on a controller rspec test:

  it "show action should render show template" do
    task = Task.make
    task.mission = Mission.make
    get :show, :id => task
    response.should render_template(:show)
  end

But it fails rendering the view because of this:

<%=h @task.mission.name %>

I don't get it... :/

© Stack Overflow or respective owner

Related posts about ruby-on-rails

Related posts about rspec