Sha256: c7797077a3e400ca15cc5cbf57f229b3bb6c474ae88ad2f2f997d5ea814c101b
Contents?: true
Size: 967 Bytes
Versions: 31
Compression:
Stored size: 967 Bytes
Contents
require 'spec_helper' describe Krikri::Engine do describe 'configuration' do before do settings_path = Krikri::Engine.root .join('config', 'settings.local.yml').to_s File.stub(:exists?).and_call_original File.stub(:exists?).with(settings_path).and_return(true) IO.stub(:read).and_call_original IO.stub(:read).with(settings_path) .and_return("---\n\nqa_test: 'test!'") Contentqa::Settings.reload! end it 'includes its settings in rails_config' do expect(Contentqa::Settings.qa_test).to eq 'test!' end it 'allows app to override configuration' do app_settings_path = Rails.root.join('config', 'settings.local.yml').to_s File.stub(:exists?).with(app_settings_path).and_return(true) IO.stub(:read).with(app_settings_path).and_return("---\n\napi_test: 'app!'") Contentqa::Settings.reload! expect(Contentqa::Settings.api_test).to eq 'app!' end end end
Version data entries
31 entries across 31 versions & 1 rubygems