Sha256: 155045a1e994b1075bf8ffa68cd3d1a9e4092b0f3801ad8ee8f16feefbb2c036
Contents?: true
Size: 552 Bytes
Versions: 1
Compression:
Stored size: 552 Bytes
Contents
require 'spec_helper' describe FigNewton do context "when asking for data" do it "should retrieve the data by a key named after the method called" do FigNewton.yml_directory = 'conf' yml_mock = double('yaml') expect(File).to receive(:read).with('conf/test').and_return('test') expect(YAML).to receive(:load).and_return(yml_mock) expect(yml_mock).to receive(:[]).with('desired_data').and_return('information') FigNewton.load('test') expect(FigNewton.desired_data).to eql 'information' end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
fig_newton-0.12 | spec/fig_newton/fig_newton_spec.rb |