Sha256: c3c4366ab55d75f56b31193bc79e032f31cdf422492197708112ea9eb2e63293

Contents?: true

Size: 485 Bytes

Versions: 4

Compression:

Stored size: 485 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 = {'desired_data' => 'information'}
      expect(File).to receive(:read).with('conf/test').and_return('test')
      expect(YAML).to receive(:load).and_return(yml_mock)
      FigNewton.load('test')
      expect(FigNewton.desired_data).to eql 'information'
    end
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
fig_newton-1.0 spec/fig_newton/fig_newton_spec.rb
fig_newton-0.15 spec/fig_newton/fig_newton_spec.rb
fig_newton-0.14 spec/fig_newton/fig_newton_spec.rb
fig_newton-0.13 spec/fig_newton/fig_newton_spec.rb