Re: [rspec-users] Problems with RESTfully generated helpers

2007-08-12 Thread Jay Levitt
Lance Carlson wrote: > It was never resolved.. the only resolution was to mock out the > methods at this point or provide the views with the instance > variables. Well, I didn't get anywhere tonight - but I did discover that script/console has the same problem. Given routes.rb: map.resources :u

Re: [rspec-users] Problems with RESTfully generated helpers

2007-08-12 Thread Lance Carlson
It was never resolved.. the only resolution was to mock out the methods at this point or provide the views with the instance variables. On 8/12/07, Jay Levitt <[EMAIL PROTECTED]> wrote: > David Chelimsky wrote: > > On 8/10/07, Lance Carlson <[EMAIL PROTECTED]> wrote: > >> Thanks for your patience

Re: [rspec-users] Problems with RESTfully generated helpers

2007-08-12 Thread Jay Levitt
David Chelimsky wrote: > On 8/10/07, Lance Carlson <[EMAIL PROTECTED]> wrote: >> Thanks for your patience trying to resolve this issue. I posted a bug >> report here: >> >> http://rubyforge.org/tracker/index.php?func=detail&aid=12963&group_id=797&atid=3149 > > I see it - thanks. If you have time n

Re: [rspec-users] Problems with RESTfully generated helpers

2007-08-10 Thread David Chelimsky
On 8/10/07, Lance Carlson <[EMAIL PROTECTED]> wrote: > Thanks for your patience trying to resolve this issue. I posted a bug > report here: > > http://rubyforge.org/tracker/index.php?func=detail&aid=12963&group_id=797&atid=3149 I see it - thanks. If you have time now, Lance, pls join the #rspec IR

Re: [rspec-users] Problems with RESTfully generated helpers

2007-08-10 Thread Lance Carlson
Thanks for your patience trying to resolve this issue. I posted a bug report here: http://rubyforge.org/tracker/index.php?func=detail&aid=12963&group_id=797&atid=3149 On 8/10/07, David Chelimsky <[EMAIL PROTECTED]> wrote: > On 8/9/07, Lance Carlson <[EMAIL PROTECTED]> wrote: > > About these metho

Re: [rspec-users] Problems with RESTfully generated helpers

2007-08-10 Thread David Chelimsky
On 8/9/07, Lance Carlson <[EMAIL PROTECTED]> wrote: > About these methods requiring arguments? I thought you were able to > reproduce the problems I was having and was also able to reproduce a > working application with no arguments. That is correct. > By default these methods should > not requir

Re: [rspec-users] Problems with RESTfully generated helpers

2007-08-09 Thread Lance Carlson
About these methods requiring arguments? I thought you were able to reproduce the problems I was having and was also able to reproduce a working application with no arguments. By default these methods should not require arguments to be passed as it is unnecessary noise in the code. Perhaps we can c

Re: [rspec-users] Problems with RESTfully generated helpers

2007-08-09 Thread David Chelimsky
On 8/9/07, Lance Carlson <[EMAIL PROTECTED]> wrote: > Is it possible that rspec is not pulling the instance variables into > the method because this method is being defined before instance > variables in parameters are assigned to that method? I'm trying to > hone down where the problem is popping

Re: [rspec-users] Problems with RESTfully generated helpers

2007-08-09 Thread Lance Carlson
Is it possible that rspec is not pulling the instance variables into the method because this method is being defined before instance variables in parameters are assigned to that method? I'm trying to hone down where the problem is popping up exactly. Any insight? On 8/9/07, David Chelimsky <[EMAIL

Re: [rspec-users] Problems with RESTfully generated helpers

2007-08-09 Thread David Chelimsky
On 8/9/07, Lance Carlson <[EMAIL PROTECTED]> wrote: > Were you able to come up with any solutions? Nope. Anyone else? > > On 8/8/07, David Chelimsky <[EMAIL PROTECTED]> wrote: > > On 8/8/07, Lance Carlson <[EMAIL PROTECTED]> wrote: > > > Awesome! Thank you! :) > > > > Don't thank me yet. I've spe

Re: [rspec-users] Problems with RESTfully generated helpers

2007-08-09 Thread Lance Carlson
Were you able to come up with any solutions? On 8/8/07, David Chelimsky <[EMAIL PROTECTED]> wrote: > On 8/8/07, Lance Carlson <[EMAIL PROTECTED]> wrote: > > Awesome! Thank you! :) > > Don't thank me yet. I've spent some time trying to track this down and > I've found my way into some methods in ro

Re: [rspec-users] Problems with RESTfully generated helpers

2007-08-08 Thread David Chelimsky
On 8/8/07, Lance Carlson <[EMAIL PROTECTED]> wrote: > Awesome! Thank you! :) Don't thank me yet. I've spent some time trying to track this down and I've found my way into some methods in routing.rb that are dynamically generated (and so you can't )(*&)(*& read them to debug them quite so easily) t

Re: [rspec-users] Problems with RESTfully generated helpers

2007-08-08 Thread Lance Carlson
Awesome! Thank you! :) On 8/8/07, David Chelimsky <[EMAIL PROTECTED]> wrote: > On 8/8/07, Lance Carlson <[EMAIL PROTECTED]> wrote: > > I just visited the action in my browser and i don't get any errors. I > > am also running on edge rails as the application relies on > > ActiveResource. Can you sh

Re: [rspec-users] Problems with RESTfully generated helpers

2007-08-08 Thread David Chelimsky
On 8/8/07, Lance Carlson <[EMAIL PROTECTED]> wrote: > I just visited the action in my browser and i don't get any errors. I > am also running on edge rails as the application relies on > ActiveResource. Can you show me the code you created? OK - I've created a small project and am able to reproduc

Re: [rspec-users] Problems with RESTfully generated helpers

2007-08-08 Thread Lance Carlson
Yes, map.resources :labels do |label| label.resources :artists end On 8/8/07, Jay Levitt <[EMAIL PROTECTED]> wrote: > David Chelimsky wrote: > > On 8/8/07, Lance Carlson <[EMAIL PROTECTED]> wrote: > >> All I'm doing is passing the instance variables @label and @artist in > >> the controll

Re: [rspec-users] Problems with RESTfully generated helpers

2007-08-08 Thread Jay Levitt
David Chelimsky wrote: > On 8/8/07, Lance Carlson <[EMAIL PROTECTED]> wrote: >> All I'm doing is passing the instance variables @label and @artist in >> the controller to the view using this code: >> >> @label = current_user.labels.find(params[:label_id]) >> @artist = params[:id].nil? ? Artist.new

Re: [rspec-users] Problems with RESTfully generated helpers

2007-08-08 Thread Lance Carlson
David, I know for a fact that these helpers do not require arguments to be sent to them. Does anyone have any idea why rspec is forcing this to happen? On 8/8/07, Lance Carlson <[EMAIL PROTECTED]> wrote: > I just visited the action in my browser and i don't get any errors. I > am also running on e

Re: [rspec-users] Problems with RESTfully generated helpers

2007-08-08 Thread Lance Carlson
I just visited the action in my browser and i don't get any errors. I am also running on edge rails as the application relies on ActiveResource. Can you show me the code you created? On 8/8/07, David Chelimsky <[EMAIL PROTECTED]> wrote: > On 8/8/07, Lance Carlson <[EMAIL PROTECTED]> wrote: > > All

Re: [rspec-users] Problems with RESTfully generated helpers

2007-08-08 Thread David Chelimsky
On 8/8/07, Lance Carlson <[EMAIL PROTECTED]> wrote: > All I'm doing is passing the instance variables @label and @artist in > the controller to the view using this code: > > @label = current_user.labels.find(params[:label_id]) > @artist = params[:id].nil? ? Artist.new : @label.artists.find(params[:

Re: [rspec-users] Problems with RESTfully generated helpers

2007-08-08 Thread Lance Carlson
All I'm doing is passing the instance variables @label and @artist in the controller to the view using this code: @label = current_user.labels.find(params[:label_id]) @artist = params[:id].nil? ? Artist.new : @label.artists.find(params[:id]) By sending these two instance variables to the view, I

Re: [rspec-users] Problems with RESTfully generated helpers

2007-08-08 Thread David Chelimsky
On 8/8/07, Lance Carlson <[EMAIL PROTECTED]> wrote: > I just passed label_artist_path(@label.id, @artist.id) into the view > and it worked.. but I really don't want to have to pass those > parameters in all my views. It looks ugly. Does anyone know a way > around this without stubbing? It seems use

Re: [rspec-users] Problems with RESTfully generated helpers

2007-08-08 Thread Lance Carlson
I just passed label_artist_path(@label.id, @artist.id) into the view and it worked.. but I really don't want to have to pass those parameters in all my views. It looks ugly. Does anyone know a way around this without stubbing? It seems useless to test this view without allowing those methods to act

Re: [rspec-users] Problems with RESTfully generated helpers

2007-08-08 Thread Lance Carlson
ActionView::TemplateError in 'Edit Artist Page should render the edit artist form' label_artist_url failed to generate from {:controller=>"artists", :action=>"show"} - you may have ambiguous routes, or you may need to supply additional parameters for this route. content_url has the following requi

Re: [rspec-users] Problems with RESTfully generated helpers

2007-08-08 Thread David Chelimsky
On 8/8/07, Lance Carlson <[EMAIL PROTECTED]> wrote: > I am using helper the RESTfully generated helper methods in my views. > My routes are nested so the helpers appear to need arguments passed to > them, but it works without arguments. Say for example I have pages and > comments. If I do page_comm