I have a class that puts some info into a database. Here is the method from the class I'm testing:
def load(configs) opts = { access_token: configs['token'], api_endpoint: configs['endpoint'], web_endpoint: configs['site'], auto_paginate: configs['pagination']} client = Octokit::Client.new(opts) repos = client.org_repos(configs['org']) repos.each do |r| Project.create(name: r.name) end rescue NoMethodError raise GitConfigError, 'put something here yet' end end I successfuly can test if it raises an error, however I don't know how to go about testing if the data is being put into the database correctly. I can't seem to find any resources on it either. Though, I did test the model in another spec. Any insight would be appreciated!