Sha256: ff0ac901c3cd63a19e10ee38c8a251e578266e4d6aeed39490428ae888de9d67

Contents?: true

Size: 488 Bytes

Versions: 9

Compression:

Stored size: 488 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')
      YAML.should_receive(:load_file).with('conf/test').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

9 entries across 9 versions & 1 rubygems

Version Path
fig_newton-0.9 spec/fig_newton/fig_newton_spec.rb
fig_newton-0.8 spec/fig_newton/fig_newton_spec.rb
fig_newton-0.7 spec/fig_newton/fig_newton_spec.rb
fig_newton-0.6 spec/fig_newton/fig_newton_spec.rb
fig_newton-0.5 spec/fig_newton/fig_newton_spec.rb
fig_newton-0.4 spec/fig_newton/fig_newton_spec.rb
fig_newton-0.3 spec/fig_newton/fig_newton_spec.rb
fig_newton-0.2 spec/fig_newton/fig_newton_spec.rb
fig_newton-0.1 spec/fig_newton/fig_newton_spec.rb