[rspec-users] spec'ing helpers that use controller

Rick Tessner ricktessner at canada.com
Tue Jul 24 23:54:21 EDT 2007


Hi,

This worked just fine. :)  Thanks.

On Tue, 2007-24-07 at 16:30 -0700, Courtenay wrote:
> specing helpers just includes the module in your spec.
> 
> So you can cheat like
> 
> describe "Application Helper" do
>   helper_name :application
> 
>   def controller
>     @controller
>   end
> 
>   before(:each) do
>     @controller = mock('controller')
>   end
> 
>   it "should blah blah" do
>   end
> 
> end
> _______________________________________________
> rspec-users mailing list
> rspec-users at rubyforge.org
> http://rubyforge.org/mailman/listinfo/rspec-users
-- 
Rick Tessner <ricktessner at canada.com>



More information about the rspec-users mailing list