Sha256: 4e1a2bb07b2b0ef5346c11730700120e05e952033d09030b5ffea3fa18f2307f
Contents?: true
Size: 884 Bytes
Versions: 5
Compression:
Stored size: 884 Bytes
Contents
require 'spec_helper' module AlchemyCrm describe 'Configuration' do describe 'file' do context 'is present in host application' do before(:each) do @config_file = Rails.root.join('config', 'alchemy_crm.config.yml') File.open(@config_file, 'w') do |file| file.puts({'mail_from' => 'jon@doe.com'}.to_yaml) end end it "should load the app config" do Config.show.should == {'mail_from' => 'jon@doe.com'} end after(:each) do FileUtils.rm_f @config_file end end context 'is not present in application' do it 'should load the default config' do default_config = File.join(File.dirname(__FILE__), '..', 'config/alchemy_crm.config.yml') Config.show.should == YAML.load_file(default_config) end end end end end
Version data entries
5 entries across 5 versions & 1 rubygems