Fix broken standardized failure output. Fix formatting issues

This commit is contained in:
Mark VanderVoord
2026-03-20 17:34:45 -04:00
parent 54fb72f508
commit 1d336f6ddb
6 changed files with 18 additions and 14 deletions
+5 -5
View File
@@ -53,7 +53,7 @@ class UnityModuleGenerator
def initialize(options = nil)
@options = UnityModuleGenerator.default_options
case options
when NilClass then @options
when NilClass then nil # leave @options unchanged
when String then @options.merge!(UnityModuleGenerator.grab_config(options))
when Hash then @options.merge!(options)
else raise 'If you specify arguments, it should be a filename or a hash of options'
@@ -158,10 +158,10 @@ class UnityModuleGenerator
template: cfg[:template],
test_define: cfg[:test_define],
boilerplate: cfg[:boilerplate],
includes: case (cfg[:inc])
when :src then (@options[:includes][:src] || []) | (pattern_traits[:inc].map { |f| format(f, module_name) })
includes: case cfg[:inc]
when :src then (@options[:includes][:src] || []) | pattern_traits[:inc].map { |f| format(f, module_name) }
when :inc then @options[:includes][:inc] || []
when :tst then (@options[:includes][:tst] || []) | (pattern_traits[:inc].map { |f| format("#{@options[:mock_prefix]}#{f}", module_name) })
when :tst then (@options[:includes][:tst] || []) | pattern_traits[:inc].map { |f| format("#{@options[:mock_prefix]}#{f}", module_name) }
end
}
end
@@ -182,7 +182,7 @@ class UnityModuleGenerator
############################
def create_filename(part1, part2 = '')
name = part2.empty? ? part1 : "#{part1}_#{part2}"
case (@options[:naming])
case @options[:naming]
when 'bumpy' then neutralize_filename(name, start_cap: false).delete('_')
when 'camel' then neutralize_filename(name).delete('_')
when 'snake' then neutralize_filename(name).downcase