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
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
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
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
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
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:
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