Created
February 15, 2018 20:45
-
-
Save myronmarston/f2c5965da3c9a9989bb773f9b4e0d094 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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