Testing Using Stubs
Reported by Gary Taylor | August 30th, 2008 @ 05:58 AM
In a normal rails app, I can use stubs whilst testing (I may have the terminology wrong here - where you can replace 1 class (or even a method of a class) with another). I tried doing a similar thing in a plugin test but it did not seem to do anything. Can you tell me if this is supported and how to do it ?
Thanks
Gary
Comments and changes to this ticket
-
James Adam September 13th, 2008 @ 10:08 AM
- → Tag changed from to test
- → State changed from new to resolved
The engines plugin doesn't knowingly do anything special towards Rails' 'mocks' mechanism, but I can't confirm whether or not it works even with normal plugin tests.
Plugin tests tend to run somewhat 'outside' the normal Rails test environment, so I wouldn't be surprised if they never did.
Personally, I recommend Mocha over the built-in 'mocks' folder functionality.
I'm going to close this ticket, as I don't believe there's anything that we need to do. However, if you can demonstrate that there's some negative interaction between the engines plugin and Rails' built in mechanism, please do re-open it with more details.
Please Login or create a free account to add a new comment.
You can update this ticket by sending an email to from your email client. (help)
Create your profile
Help contribute to this project by taking a few moments to create your personal profile. Create your profile »
The rails engines plugin itself
