Skip to content
This repository has been archived by the owner on May 4, 2024. It is now read-only.

Commit

Permalink
Respect option overrides over defaults
Browse files Browse the repository at this point in the history
  • Loading branch information
floriandejonckheere committed Apr 19, 2024
1 parent 514daf8 commit 7042fc9
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion lib/mosaik/arguments.rb
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ module Arguments

def initialize(options, *command_args)
# Initialize options with default values
@options = options.merge(self.class.options.dup)
@options = self.class.options.merge(options)

# Parse command arguments
self.class.parser.parse!(command_args, into: @options)
Expand Down
2 changes: 1 addition & 1 deletion spec/mosaik/commands/extract_spec.rb
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# frozen_string_literal: true

RSpec.describe MOSAIK::Commands::Extract do
subject(:command) { build(:extract_command, arguments:) }
subject(:command) { build(:extract_command, options:, arguments:) }

let(:options) { { file: "README.md" } }
let(:arguments) { [] }
Expand Down

0 comments on commit 7042fc9

Please sign in to comment.