私は ruby と rspec の両方に不慣れで、ファイルを解析する必要があるクラスをテストする方法を知りたいと思っています。テストする予定の関数は次のとおりです。
def self.get_description(event_code)
# search through a file for the event_code and return
# the associated description field
end
本番環境では、ファイルのパスをハード コードします。rspec からファイルの内容を制御するにはどうすればよいですか?