[rspec-users] Access controller object in controller macro

2012-04-17 Thread Nasir Jamal
Hi We have just upgraded our Rails 2.3.11 app to Rails 3.0.0 and Rspec 1.3.2 to 2.6. We are having two problems with rspec currently and any help would be great. 1) We have some controller macros where we have been using the controller object, session hash, response, etc. in different methods

Re: [rspec-users] Access controller object in controller macro

2012-04-18 Thread Nasir Jamal
rom: Justin Ko To: Nasir Jamal ; rspec-users Sent: Wednesday, 18 April 2012, 9:34 Subject: Re: [rspec-users] Access controller object in controller macro On Apr 17, 2012, at 1:30 PM, Nasir Jamal wrote: >Hi > >We have just upgraded our Rails 2.3.11 app to Rails 3.0.0 and Rspec 1.3.2 to

Re: [rspec-users] rspec-users Digest, Vol 70, Issue 13

2012-04-18 Thread Nasir Jamal
8 Apr 2012 01:59:09 -0700 (PDT) From: Nasir Jamal To: Justin Ko , rspec-users     Subject: Re: [rspec-users] Access controller object in controller     macro Message-ID:     <1334739549.63935.yahoomail...@web162601.mail.bf1.yahoo.com> Content-Type: text/plain; charset="iso-8859-1&quo

[rspec-users] newbie: need help to write the spec for helper

2008-12-31 Thread Nasir Jamal
Hi, I am a rspec newbie, can anyone guide me on how to write a spec for the below helper. module MyHelper  def test    link_to('MyLink', resources_path) if @categories || @sub_categories  end end @categories is an instance of Category model @sub_categories is an instance of SubCategory model

[rspec-users] How to spec a controller method that involves an rjs redirect

2009-01-02 Thread Nasir Jamal
Hi everyone, What is the best way to spec a controller method that involves an rjs redirect? Something like this def index   url_to = @parent ? auction_bids_path(@parent)  : auctions_path   render :update do |page|     page.redirect_to(url_to)   end end I tried  response.should have_rjs for t