I'm completely lost here.  Can anyone shed some light on this?


In the SnS extension I have created the following...

In styles_n_scripts_extension.rb (activate method):
 SiteController.send :include, SiteControllerExtensions

In the /lib/site_controller_extensions.rb file:
module SiteControllerExtensions; end (Yes, it's empty. I stripped everything out trying to debug)

In the failing spec (describing SiteController):
 it "should render an existing page" do
   get :show_page, :url => '/'
   response.body.should == "Hello World!"
 end


Apparently, the SiteController also mixes-in the login_system which creates its own before_filter that calls the #authenticate method. This method, in turn, calls no_login_required? SiteController *should* respond 'true' -- that no login is required. But here's where it gets weird...

If I comment out my include line (the one in the extension's activate method above) SiteController does, indeed respond 'true' to no_login_required? But, the minute I add in that include and mix in my extensions -- even with *nothing* in my mixed-in module -- SiteController starts responding 'false' -- that login is required. My spec'ed get request then returns a redirect to the login page.

This only happens when running specs. Testing with a server in development mode works fine. Thoughts anyone?


-Chris
_______________________________________________
Radiant mailing list
Post:   Radiant@radiantcms.org
Search: http://radiantcms.org/mailing-list/search/
Site:   http://lists.radiantcms.org/mailman/listinfo/radiant

Reply via email to