Stop Lotus::Lotusrc to write .lotusrb file automatically


Since the lotusrc file gets written with default values (if it does not exist) when Lotus::Lotusrc is instantiated, every class that uses L::Lotusrc might write a file as a sideeffect.

I don’t think that this is nice behavior of a class (even though it is documented in L::Lotusrc, it is unclear what class is instantiating it).

I’d propose to remove this “auto-write”.

The .lotusrc file should be added by a generator (lotus new) or manually., i think. If the file is not there and L::Lotusrc is used, then the default values should be returned.

What do you think?


I agree with you @pascalbetz Lotusrc should only take care of read the file, maybe throw an exception if doesn’t exist? what do you think?


In my understanding Lotusrc is here to provide defaults and settings (architecture, test type).
So if Lotusrc is read AND the file is not there, then it can just return the defaults (container, minitest, …). This would not change the behavior (writing the files with defaults and then reading it).

Throwing an exception if it is not there, is probably not working because of side effects it might have in test scenarios (i do not want to explicitly create the file every time Lotusrc is used in some code)


better provide default options :wink:

thanks for the post