[rspec-users] Routes helpers work differently from helper examples compared to page rendering

2009-07-04 Thread Ed Ruder
I have a helper that calls a Rails route _url method. In the context of a helper spec file, the route helper method ends up calling url_for in rails/actionpack/lib/action_controller/base.rb. In the context of rendering a page, the route helper method calls url_for in rails/ actionpack/lib/action_vi

Re: [rspec-users] Routes helpers work differently from helper examples compared to page rendering

2009-07-08 Thread Ed Ruder
te: > On Sat, Jul 4, 2009 at 4:40 PM, Ed Ruder wrote: > > I have a helper that calls a Rails route _url method. In the context > > of a helper spec file, the route helper method ends up calling url_for > > in rails/actionpack/lib/action_controller/base.rb. In the context of

[rspec-users] [Rails] How to mock/stub link_to from a Rails helper spec?

2009-08-20 Thread Ed Ruder
All, In a Rails helper spec, how do I stub or mock the 'link_to' method? When i step into link_to, self.class is Spec::Rails::Example::HelperExampleGroup::Subclass_1::Subclass_5::Subclass_1. What I'm trying to do is stub link_to and check that its parameters are correct--i.e., that a helper metho

[rspec-users] Change in -l command line option when line number is inside a describe block?

2009-08-20 Thread Ed Ruder
All, I often run specs from inside of TextMate, using the RSpec bundle. When the selection is inside of an example, I can run just that example using the RSpec bundle's "Run Single Example" script, which I assume ends up calling spec with a -l command line option ("line number"). Until a few vers

Re: [rspec-users] Change in -l command line option when line number is inside a describe block?

2009-08-20 Thread Ed Ruder
I lied--I'm running 1.2.7, but I'm happy that this was fixed in 1.2.8! Thanks, David. Ed On Aug 20, 12:28 pm, David Chelimsky wrote: > On Thu, Aug 20, 2009 at 2:16 PM, Ed Ruder wrote: > > All, > > > I often run specs from inside of TextMate, using the RSpec bundl

Re: [rspec-users] [Rails] How to mock/stub link_to from a Rails helper spec?

2009-08-21 Thread Ed Ruder
On Aug 20, 3:02 pm, Mike Sassak wrote: > On Thu, Aug 20, 2009 at 3:00 PM, Ed Ruder wrote: > > All, > > > In a Rails helper spec, how do I stub or mock the 'link_to' method? > > When i step into link_to, self.class is > > > Spec::Rails::Example:

[rspec-users] Failing in TextMate but not in rake...

2008-09-04 Thread Ed Ruder
When I run a spec file from TextMate using the RSpec bundle's "Run Examples" command (either using command-R or the bundle menu item with the spec file open), I get an error dialog with the following text: "Missing the Rails 2.0.2 gem. Please `gem install -v=2.0.2 rails`, update your RAILS_GEM_VER