简体   繁体   中英

Where to put test implementation classes in Rails?

I have a class in lib that has some application logic in it. I want to have a separate implementation of this class that will be used in automated functional tests. Is there a good place where I can put this class to? Ideally I don't want it to be loaded when I am running a web site in production.

if the class in lib holds application logic, it should go in app/xyz .

if you want to create a dummy subclass or a ducktype for testing, just put it into your test-file.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM