By default, rake:notes searches for annotations in the app, lib, and test directories. If you have code in other directories that you would like to be searched for annotations, you can override rake:notes‘ defaults by overriding SourceAnnotationExtractor#find.
I use RSpec and Cucumber, and wanted rake:notes to traverse my spec and features directories. To achieve this, I created a file called lib/tasks/notes.rake:
# Override the directories that the # SourceAnnotationExtractor traverses # when you call rake notes class SourceAnnotationExtractor def find_with_custom_directories find_without_custom_directories(%w(app lib spec features)) end alias_method_chain :find, :custom_directories end





