tendersearls / tldr

A Ruby test framework for people who don't have time for slow tests 💣💥
MIT License
250 stars 4 forks source link

How to implement a custom reporter and set it? #15

Open pusewicz opened 2 weeks ago

pusewicz commented 2 weeks ago

There is an option to set the custom reporter, but currently I don't see a simple way to implement a reporter and have it required. Having it defined in the helper does... not help!

bundle exec tldr --reporter TLDR::Reporters::Mini
.gem/ruby/3.3.0/gems/tldr-0.10.0/lib/tldr/argv_parser.rb:62:in `block (2 levels) in parse': uninitialized constant TLDR::Reporters::Mini (NameError)

          options[:reporter] = Kernel.const_get(reporter)
searls commented 2 weeks ago

I don't think any have been created, but in that example you'd probably need to run the tldr CLI with ruby such that it loaded that class before running TLDR's code