I have an average Rails application. The main controller (the one that does what the application should do) has one action method. (This is not a standard RESTful application, it acts as an intermediary and external restrictions on how it can be called.)
However, it has many methods, many filters, and an ever-growing set of tests. The structure has changed significantly over time, and I'm no longer sure that some of Mocha's expectations, which were set up for tests written earlier, are still relevant.
There are several people in the application, so I create cooking for writing functional tests. "Use [these] expectations and statements when you want to test / without [those] side effects," etc.
The call tree / graph will be extremely useful when compiling such a document. Besides filters, these can even be statically obtained from sources - something that was known about the Rails all-all-all-all model, so maybe statics is not such a good idea. :-)
I tried using RubyProf with my functional tests to get a call tree, but all I get are trees related to testing methods and parts of the kernel and Rails, and none of the controller methods. (At least this is not what I found, profiling creates many small files instead of one large one).
The inability to find controller methods may be related to how the action method is called - via send , and not some more "normal" mechanism.
Blah, blah, blah ... just FYI on what I've tried so far.
Is there a good tool for building who-calls-what flowchart / call tree for a Rails 2.3.8 application?
Thanks!
profiling ruby ruby-on-rails
Rous
source share