Hi,
In my objects controller, I call the following in order to create an
object:
def create
@object = @account.objects.build params[:object]
respond_to do |format|
if @object.save
…
end
The account variable is populated by a before filter in
application.rb.
When I try to test this though, I keep receiving a nil object error.
It seems to be that the test does not recognise the before filter and
therefore cannot create the object.
How do I make my test recognise the account variable?
Thanks in advance.
Robin