Re: [rspec-users] Testing misc methods in ApplicationController

2009-02-14 Thread Fernando Perez
> 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

Re: [rspec-users] Testing misc methods in ApplicationController

2009-02-13 Thread Nick Hoffman
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("

Re: [rspec-users] Testing misc methods in ApplicationController

2009-02-13 Thread Mark Wilden
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

Re: [rspec-users] Testing misc methods in ApplicationController

2009-02-13 Thread Fernando Perez
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

Re: [rspec-users] Testing misc methods in ApplicationController

2008-02-22 Thread David Chelimsky
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 > > <

Re: [rspec-users] Testing misc methods in ApplicationController

2008-02-22 Thread 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

Re: [rspec-users] Testing misc methods in ApplicationController

2008-02-22 Thread David Chelimsky
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

[rspec-users] Testing misc methods in ApplicationController

2008-02-22 Thread Max Williams
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