With Rails 3, the Plugin and Generator architecture has been vastly improved, and I like many others I am sure want develop my own generators and plugins.
I have seen there is a Rails::Generator::TestCase you can inherit your unit test class from to facilitate testin generators (for examples of use see ‘rails3-generators’ project on github). It is pretty easy and intuitive to use and makes generator development so much better! But what about generators that cause the shell to ask the users questions to guide the process? I did find a gem called ‘session’ which enables you to operate on the shell session as it is executing… and theres is also a ‘fakefs’ gem, to fake the file system. What is the testing pattern to integrate these gems in the process?
I am however not sure how to go about testing Rails 3 plugin development or Rails Engines (such as Devise). Please shed some light on this! Would be awesome with some chapters covering these issues of Rails Testing :) Maybe an Advanced Rails Testing in the last part of the book? Thanks!