Sha256: 337f7e60e8d20c8b89d7a0ccba25af59fcd2290ceade02ab74a532e5ea651348

Contents?: true

Size: 535 Bytes

Versions: 2

Compression:

Stored size: 535 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')
      File.should_receive(:read).with('conf/test').and_return('test')
      YAML.should_receive(:load).and_return(yml_mock)
      yml_mock.should_receive(:[]).with('desired_data').and_return('information')
      FigNewton.load('test')
      FigNewton.desired_data.should == 'information'
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
fig_newton-0.11 spec/fig_newton/fig_newton_spec.rb
fig_newton-0.10 spec/fig_newton/fig_newton_spec.rb