In my Rails application, I actively use subdirectories of the model directory and therefore models with names, that is, I have the following directory hierarchy:
models | +- base_game | | | +- foo.rb (defines class BaseGame::Foo) | +- expansion | +- bar.rb (defines class Expansion::Bar)
This is enforced by Rails, that is, it just doesnβt work to call the classes βjustβ Foo and Bar .
I want to unit test these classes (using "Paste" on top of ActiveSupport :: TestCase). I know that the class name under the test will be derived from the class name of the test case.
How to write unit tests that will test these classes?
source share