Skip to content

Instantly share code, notes, and snippets.

@myronmarston
Created February 15, 2018 20:45
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save myronmarston/f2c5965da3c9a9989bb773f9b4e0d094 to your computer and use it in GitHub Desktop.
Save myronmarston/f2c5965da3c9a9989bb773f9b4e0d094 to your computer and use it in GitHub Desktop.
require 'yaml'
class X
def self.y
YAML.load_file("abc")
end
end
RSpec.describe X do
it 'works' do
allow(YAML).to receive(:load_file).and_return("loaded data")
expect(X.y).to eq("loaded data")
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment