lib/benchmark/output.rb in benchmark_driver-0.8.5 vs lib/benchmark/output.rb in benchmark_driver-0.8.6
- old
+ new
@@ -4,9 +4,12 @@
# Create `Benchmark::Output::FooBar` as benchmark-output-foo_bar.gem and specify `output: foo_bar`.
#
# @param [Symbol] name
def find(name)
class_name = Benchmark::Driver::Configuration.camelize(name.to_s)
+ unless Benchmark::Output.const_defined?("#{class_name}::REQUIRED_FIELDS")
+ require "benchmark/output/#{name}"
+ end
Benchmark::Output.const_get(class_name, false)
end
end
end