Skip to content

Commit

Permalink
Fix Rubocop offenses
Browse files Browse the repository at this point in the history
  • Loading branch information
tvdeyen committed May 21, 2020
1 parent 6c93e87 commit 3e10302
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
1 change: 1 addition & 0 deletions lib/alchemy/config.rb
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,7 @@ def read_file(file)
#
def merge_configs!(*config_files)
raise LoadError, "No Alchemy config file found!" if config_files.map(&:blank?).all?

config = {}
config_files.each { |h| config.merge!(h.stringify_keys!) }
config
Expand Down
4 changes: 3 additions & 1 deletion spec/libraries/config_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,9 @@ module Alchemy
context "when configs containing same keys" do
it "should merge them together" do
expect(Config.send(:merge_configs!, config_1, config_2)).to eq(
{ "setting_1" => "same", "other_setting" => "something", "setting_2" => "anything" }
"setting_1" => "same",
"other_setting" => "something",
"setting_2" => "anything",
)
end
end
Expand Down

0 comments on commit 3e10302

Please sign in to comment.