I am new to rspec and wanted to ask how one would go about testing the following.
I have an import method that takes in a json feed and my goal is to parse and save certain data based on certain conditions.
for example:
def self.import(json_feed)
#save certain pieces of data
end
I was wondering what the best way to simulate the json feed is? Should I be creating a json object and saving it into a variable and then passing that in? or are there better conventions for something like this.
Thank You!