Yuval
2008-Aug-27 00:04 UTC
Sporadic NonInferrableControllerError on nested controller tests with Rails 2.1
Hey folks. I''ve been getting this aggravating error sporadically on some of my nested controller tests since upgrading to Rails 2.1. The last bout seems to be here to stay and it''s driving me mad. I have the following in my controllers dir (names changed for simplicity): tools_controller.rb tools folder tools/screwdriers_controller.rb tools/wrenches_controller.rb tools/hammers_controller.rb When I run rake, I am getting NonInferrableControllerError errors on two out of the three nested controllers and for the life of me, I have no idea why. If I run the test files individually, I get no errors. Insight appreciated. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
Yuval
2008-Aug-27 14:39 UTC
Re: Sporadic NonInferrableControllerError on nested controller tests with Rails 2.1
Here''s the trace I get from rake. [code=]ActionController::NonInferrableControllerError: Unable to determine the controller to test from WrenchesControllerTest. You''ll need to specify it using ''tests YourController'' in your test case definition. This could mean that WrenchesControllerTest does not exist or it contains syntax errors /usr/local/lib/ruby/gems/1.8/gems/actionpack-2.1.0/lib/ action_controller/test_case.rb:64:in `determine_default_controller_class'' /usr/local/lib/ruby/gems/1.8/gems/actionpack-2.1.0/lib/ action_controller/test_case.rb:57:in `controller_class'' /usr/local/lib/ruby/gems/1.8/gems/actionpack-2.1.0/lib/ action_controller/test_case.rb:73:in `setup_controller_request_and_response'' /usr/local/lib/ruby/gems/1.8/gems/activesupport-2.1.0/lib/ active_support/callbacks.rb:173:in `send'' /usr/local/lib/ruby/gems/1.8/gems/activesupport-2.1.0/lib/ active_support/callbacks.rb:173:in `evaluate_method'' /usr/local/lib/ruby/gems/1.8/gems/activesupport-2.1.0/lib/ active_support/callbacks.rb:161:in `call'' /usr/local/lib/ruby/gems/1.8/gems/activesupport-2.1.0/lib/ active_support/callbacks.rb:90:in `run'' /usr/local/lib/ruby/gems/1.8/gems/activesupport-2.1.0/lib/ active_support/callbacks.rb:90:in `each'' /usr/local/lib/ruby/gems/1.8/gems/activesupport-2.1.0/lib/ active_support/callbacks.rb:90:in `send'' /usr/local/lib/ruby/gems/1.8/gems/activesupport-2.1.0/lib/ active_support/callbacks.rb:90:in `run'' /usr/local/lib/ruby/gems/1.8/gems/activesupport-2.1.0/lib/ active_support/callbacks.rb:272:in `run_callbacks'' /usr/local/lib/ruby/gems/1.8/gems/activesupport-2.1.0/lib/ active_support/testing/setup_and_teardown.rb:31:in `run''[/code] Again, if I run the rb file on its own via ruby/test/functional/ whateer_test.rb it runs just fine. The namespacing is correct, yes. One of the files that''s failing has a full suite of tests, while the other file is still in the default state with only a test_truth test. The third file that''s not failing is also in a default state. Anyone? On Aug 26, 6:04 pm, Yuval <uberll...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> Hey folks. I''ve been getting this aggravating error sporadically on > some of my nested controller tests since upgrading to Rails 2.1. The > last bout seems to be here to stay and it''s driving me mad. > > I have the following in my controllers dir (names changed for > simplicity): > > tools_controller.rb > tools folder > tools/screwdriers_controller.rb > tools/wrenches_controller.rb > tools/hammers_controller.rb > > When I run rake, I am getting NonInferrableControllerError errors on > two out of the three nested controllers and for the life of me, I have > no idea why. If I run the test files individually, I get no errors. > > Insight appreciated.--~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
Yuval
2008-Aug-27 15:35 UTC
Re: Sporadic NonInferrableControllerError on nested controller tests with Rails 2.1
Resolved. It was an SVN/TextMate issue with residual test files sticking around and conflicting namespaces. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---