diff --git a/lib/mosaik/arguments.rb b/lib/mosaik/arguments.rb index 5e7236b..31b3999 100644 --- a/lib/mosaik/arguments.rb +++ b/lib/mosaik/arguments.rb @@ -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) diff --git a/spec/mosaik/commands/extract_spec.rb b/spec/mosaik/commands/extract_spec.rb index a3814cf..c52df1f 100644 --- a/spec/mosaik/commands/extract_spec.rb +++ b/spec/mosaik/commands/extract_spec.rb @@ -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) { [] }