#30 ✓resolved
Gary Taylor

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 ?



Comments and changes to this ticket

  • James Adam

    James Adam September 13th, 2008 @ 10:08 AM

    • State changed from “new” to “resolved”
    • Tag set to test

    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 Sign in or create a free account to add a new ticket.

With your very own profile, you can contribute to projects, track your activity, watch tickets, receive and update tickets through your email and much more.

New-ticket Create new ticket

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

Shared Ticket Bins

People watching this ticket