Using Rails::Generators::TestCase to test drive your own generators This is the post I wished existed before attempting to write tests for a Rails generator with TDD. I recently added a Rails generator to my gem, serviceworker-rails, to make it easier to add the assets and configuration files needed to turn your Rails app into a Progressive Web App. I've written a few Rails generators before, but
