I am new to ruby โโand rspec, and I am wondering how to test a class that should parse a file. Here is the function I plan to test:
def self.get_description(event_code)
end
During production, I will hard-code the file path. How can I control the contents of a file from rspec?
source
share