Refactor CodeOcean::Config class
The new architecture memorizes settings (which we mostly did after reading the config so far) and also exposes the resulting file path as well as further settings. This change is a prerequisite to define a dependency with Sprockets.
This commit is contained in:

committed by
Sebastian Serth

parent
dcaedfa9fe
commit
336519b21d
@ -30,7 +30,7 @@ RSpec.describe CodeOcean::Config do
|
||||
|
||||
context 'with a .yml.erb file' do
|
||||
let(:path) { Rails.root.join('config', "#{filename}.yml.erb") }
|
||||
let(:read) { described_class.new(filename).read(erb: true) }
|
||||
let(:read) { described_class.new(filename, erb: true).read }
|
||||
|
||||
context 'when the file is present' do
|
||||
before { File.write(path, {Rails.env.to_s => content}.to_yaml) }
|
||||
|
Reference in New Issue
Block a user