I’ve been trying my best to write a class that uses initialize() with
minitest, so that I can swap out a specific dependency at runtime. It
appears, though, that I cannot use initialize() in a class that inherits
#A simple dependency which is being dispatched to.
#The main test class.
class TestProblemReproduction < MiniTest::Unit::TestCase
puts “This is here so minitest does something.”
Expected Output is to see the class Dependency output “stuff”.
The actual output is that the class Dependency outputs
However, I have a use case where I would like to use minitest to run my
test cases, but I have a bunch of tests written in selenium. With one
the selenium browser will be constructed to run locally on my desktop,
local testing. With a different flag, the selenium browser is
to run remotely on a set of remote test servers.
Is there any way I can hand a dependency into my minitest based test
Or do they have to be static?