tag:blogger.com,1999:blog-12467669.post482635478066096838..comments2023-04-29T07:23:25.825-04:00Comments on Jay Fields' Thoughts: Rails: Testing ControllersJayhttp://www.blogger.com/profile/14491442812573747680noreply@blogger.comBlogger5125tag:blogger.com,1999:blog-12467669.post-6888295714682303292010-01-28T00:38:59.036-05:002010-01-28T00:38:59.036-05:00good one !!!
My functional test facing problem of ...good one !!!<br />My functional test facing problem of "ActionController::NonInferrableControllerError: Unable to determine the controller to test from PlayerControllerTest. You'll need to specify it using 'tests YourController' in your test case definition" <br />what to do to solve this <br />plzz helpMinal Jainnoreply@blogger.comtag:blogger.com,1999:blog-12467669.post-48498493320338472007-09-10T18:17:00.000-04:002007-09-10T18:17:00.000-04:00It's not quite that easy, because controllers need...It's not quite that easy, because controllers need a little more context (the whole request, not just params) ...<BR/><BR/>But, with Merb, I can get close:<BR/><BR/>http://pastie.caboo.se/95898Anonymousnoreply@blogger.comtag:blogger.com,1999:blog-12467669.post-9790645440738923432007-09-09T18:23:00.000-04:002007-09-09T18:23:00.000-04:00Brian,Dan Manges recently released the UnitRecord ...Brian,<BR/><BR/><A HREF="http://dcmanges.com" REL="nofollow">Dan Manges</A> recently released the UnitRecord gem that redefines Model.new in the unit tests.Anonymousnoreply@blogger.comtag:blogger.com,1999:blog-12467669.post-75883285842883302482007-09-09T17:54:00.000-04:002007-09-09T17:54:00.000-04:00Jay -- Your last example is obviously leaving out ...Jay -- Your last example is obviously leaving out any references to mocking the interaction with the model layer.<BR/><BR/>Are you expressing a preference for allowing these tests to hit the DB layer, or are you proposing that the mocking could be automated somehow?Anonymousnoreply@blogger.comtag:blogger.com,1999:blog-12467669.post-71630734517181242432007-09-09T17:22:00.000-04:002007-09-09T17:22:00.000-04:00After messing around with Merb ( a rewrite of Acti...After messing around with Merb ( a rewrite of ActionPack) and seeing why Rails controllers are a bitch to test, its<BR/>becoming clear that ActionPack's days may be numbered. Hopefully Rails 2.0 will introduce a much needed refactoring.Anonymousnoreply@blogger.com