related to thread with subject "
"Permission denied" in rspec but working fine in development"
I was running my tests from the tests folder, not the Rails.root.
This really is a surprising behavior.
On Saturday, June 23, 2012 12:21:21 PM UTC-5, David Morton wrote:
I admit I have been running my tests for a while... and I'm trying to get them running again. I've been tracing this for a while and realized that it appeared that *none* of my tests appear to have permission. They used to work, several months ago, and before I upgraded to rails 3.2. But here's the kicker. I introduced a syntax error into authorization_rules.rb, and while my development mode blows up accordingly, the functional tests never notice.
I've verified that Authorization.current_user is set properly, and the roles work - the whole app works fine in development and production. It just seems like it is not loading authorization_rules.rb at all during functional tests. Any ideas what could be wrong?.
On Saturday, June 23, 2012 12:21:21 PM UTC-5, David Morton wrote:
I admit I have been running my tests for a while... and I'm trying to get them running again. I've been tracing this for a while and realized that it appeared that *none* of my tests appear to have permission. They used to work, several months ago, and before I upgraded to rails 3.2. But here's the kicker. I introduced a syntax error into authorization_rules.rb, and while my development mode blows up accordingly, the functional tests never notice.
I've verified that Authorization.current_user is set properly, and the roles work - the whole app works fine in development and production. It just seems like it is not loading authorization_rules.rb at all during functional tests. Any ideas what could be wrong?.
On Saturday, June 23, 2012 12:21:21 PM UTC-5, David Morton wrote:
I admit I have been running my tests for a while... and I'm trying to get them running again. I've been tracing this for a while and realized that it appeared that *none* of my tests appear to have permission. They used to work, several months ago, and before I upgraded to rails 3.2. But here's the kicker. I introduced a syntax error into authorization_rules.rb, and while my development mode blows up accordingly, the functional tests never notice.
I've verified that Authorization.current_user is set properly, and the roles work - the whole app works fine in development and production. It just seems like it is not loading authorization_rules.rb at all during functional tests. Any ideas what could be wrong?.