On Tue, May 24, 2011 at 10:34 PM, Paul P. wrote:
> John,
>
> I know this is quite old, but I wanted to apply your same example in
> Rspec 2. I'm getting the following when I attempt to do so.
>
> application_helper.rb
> ===
> module ApplicationHelper
>
> # Return a titl
John,
I know this is quite old, but I wanted to apply your same example in
Rspec 2. I'm getting the following when I attempt to do so.
application_helper.rb
===
module ApplicationHelper
# Return a title on a per-page basis.
def title(page_title)
content_for(:t
Ben,
You're trying to test more than one thing in one spec. The gutter
that's steered you into here is that you're looking for side-effects
of a method you've mocked. Your spec says to make sure the template
calls "body_class" and to have the call return a string, but that's
not how the body_clas
Hi guys,
I am a Rspec newbie and am having problems creating a spec for a RoR helper
method.
I have in fact already implemented the helper method and am trying to create
retrospective specs. I know its the wrong way to do it but I am still
learning Rspec.
In my view I have a call to a helper met