> You spec the public interface that calls (or causes to be called) the
> protected methods.
Ok I see. Thanks for the clarification.
--
Posted via http://www.ruby-forum.com/.
___
rspec-users mailing list
rspec-users@rubyforge.org
http://rubyforge.org/m
On 13/02/2009, at 7:26 PM, Fernando Perez wrote:
How do you spec protected controller methods such as before_filters
and
helpers that with the params and session hashes?
I cannot call controller.my_method if my_method is protected.
Try this:
controller.andreplace("foo and bar").should eql("
On Fri, Feb 13, 2009 at 4:26 PM, Fernando Perez wrote:
> How do you spec protected controller methods such as before_filters and
> helpers that with the params and session hashes?
You spec the public interface that calls (or causes to be called) the
protected methods.
///ark
How do you spec protected controller methods such as before_filters and
helpers that with the params and session hashes?
I cannot call controller.my_method if my_method is protected.
> Try this:
>
> controller.andreplace("foo and bar").should eql("+foo +bar")
--
Posted via http://www.ruby-foru
On Fri, Feb 22, 2008 at 7:58 AM, Max Williams
<[EMAIL PROTECTED]> wrote:
> doh...dammit, i thought i'd tried that. I'm losing it...
>
> thanks!
You're welcome.
Cheers,
David
>
>
>
> On 22/02/2008, David Chelimsky <[EMAIL PROTECTED]> wrote:
> > On Fri, Feb 22, 2008 at 7:26 AM, Max Williams
> > <
doh...dammit, i thought i'd tried that. I'm losing it...
thanks!
On 22/02/2008, David Chelimsky <[EMAIL PROTECTED]> wrote:
>
> On Fri, Feb 22, 2008 at 7:26 AM, Max Williams
> <[EMAIL PROTECTED]> wrote:
> > I'm already successfully testing before_filters in
> application_controller
> > courtesy o
On Fri, Feb 22, 2008 at 7:26 AM, Max Williams
<[EMAIL PROTECTED]> wrote:
> I'm already successfully testing before_filters in application_controller
> courtesy of this blog post:
> http://www.movesonrails.com/articles/2008/01/23/spec-ing-your-application-controller
>
> However, i can;'t work out ho
I'm already successfully testing before_filters in application_controller
courtesy of this blog post:
http://www.movesonrails.com/articles/2008/01/23/spec-ing-your-application-controller
However, i can;'t work out how to test the sort of method that is added to
application_controller so that all c