module YamlHelper def read_yaml(tempfile) tempfile.rewind YAML.load_file(tempfile) end end RSpec.configure do |config| config.include(YamlHelper) end