[rspec-users] locals in partials

Andrew WC Brown omen.king at gmail.com
Fri Oct 12 12:14:20 EDT 2007

Hi Jon,

I was having trouble with partials a while ago and I think it might have
info on solving your problem


I'm guessing your referring to when you called your parital in a spec:

  it "should show game name" do
    render :partial =>"games/game", :locals => {:game => @game}
    response.should have_tag('h3', /The Battle for Blaze/)

You need to provide a bit more information about your specs such as code and
reported error.

On 10/12/07, Jonathan Linowes <jonathan at parkerhill.com> wrote:
> hiya, in specing a partial, how can i assign a local var that is normally
> passed via :locals ? i tried adding :locals => to the render call but that
> doesnt seem to take
> linoj
> _______________________________________________
> rspec-users mailing list
> rspec-users at rubyforge.org
> http://rubyforge.org/mailman/listinfo/rspec-users

Monsterbox Productions
putting small businesses on-line

1319 Victoria Avenue East
Thunder Bay, Ontario P7C 1C3

Andrew WC Brown
web-developer and owner
andrew at monsterboxpro.com
P: 807-626-9009
F: 807-624-2705
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://rubyforge.org/pipermail/rspec-users/attachments/20071012/b78d23f9/attachment.html 

More information about the rspec-users mailing list