
Since both projects are developed together and by the same team, we also want to have the same code structure and utility methods available in both projects. Therefore, this commit changes many files, but without a functional change.
22 lines
566 B
Ruby
22 lines
566 B
Ruby
# frozen_string_literal: true
|
|
|
|
require 'find'
|
|
require 'active_support'
|
|
require 'rails'
|
|
|
|
RSpec.describe 'yaml config files' do
|
|
Find.find(__dir__, 'config') do |path|
|
|
next unless /.*.\.yml/.match?(path)
|
|
|
|
before do
|
|
app = instance_double Rails::Application
|
|
allow(Rails).to receive_messages(root: Pathname.new('/tmp'), application: app)
|
|
allow(app).to receive(:credentials).and_return({})
|
|
end
|
|
|
|
it "loads #{path} without syntax error" do
|
|
expect { ActiveSupport::ConfigurationFile.parse(path) }.not_to raise_error
|
|
end
|
|
end
|
|
end
|