Re: [rspec-users] Problem with view spec - works inside the browser but spec fails with nil object

2007-11-11 Thread Hans de Graaff
You are trying to test a lot of things at the same time, which is one of the reasons that it is now hard to diagnose a problem. I would tackle this by a) writing a separate spec for the partial _question_for_candidate b) write a separate spec for the helper that renders the question b) in the

Re: [rspec-users] Problem with view spec - works inside the browser but spec fails with nil object

2007-11-11 Thread Caio Moritz Ronchi
Hi Hans, I rewrote my specs the way you suggested and now everything works! For those who are interested, here's how the code looks like now (after following Hans' tips). a) writing a separate spec for the partial _question_for_candidate require File.dirname(__FILE__) + '/../../spec_helper'

[rspec-users] Problem with view spec - works inside the browser but spec fails with nil object

2007-11-10 Thread Caio Moritz Ronchi
Hi, I've been trying to find an answer for this problem in the last couple hours, but I think no discussion was about this exact same thing. So here it goes, hope someone can help. I'm trying to spec a view which works correctly on the browser, but that generates the following error when I run