I encounter a problem when i'm stubing out a library file.
The rails version is 2.3.4.
[How to reproduce]
1. Create a file payment_gateway.rb in subdirectory lib/.
2. Create a file payment_gateway.rb in subdirectory test/mocks/test.
3. Create a method in any unit test file to test this method.
The actual result is invoking the method in the mock file, and the
But if i add the following code in the application_controller.rb
The actual result is invoking the method in the lib file, and the output
I don't know why is that, could anyone give me some help?
Thanks very much.