Rails: How to test code in the lib/ directory?

In the Rails application I’m working on, I decided to just place the tests in the test\unit directory. I will also nest them by module/directory as well, for example:

lib/a.rb   => test/unit/a_test.rb
lib/b/c.rb => test/unit/b/c_test.rb

For me, this was the path of last resistance, as these tests ran without having to make any other changes.

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)