A
Abhishek Ray
I have a single ruby file, consisting of a class definition, and some
code outside the class. Our tech lead wants this keep all this in a
single file. I also have a unit test in a seperate ruby file which tests
the class. The problem is that I want the unit test to load only the
class without executing the code outside the class, which I can't do
with 'require' or 'load'.
Is there any way in Ruby to load only a single class from another file.
code outside the class. Our tech lead wants this keep all this in a
single file. I also have a unit test in a seperate ruby file which tests
the class. The problem is that I want the unit test to load only the
class without executing the code outside the class, which I can't do
with 'require' or 'load'.
Is there any way in Ruby to load only a single class from another file.