unit-testing

Rails Unit Testing - Cannot redirect to nil!

A contact has_many notes; notes belong_to a contact. In my notes controller, after a successful save of a Note, I redirect to the note's contact using: format.html { redirect_to(@note.contact, :notice => 'Note was successfully created.') } In my unit test, I'm testing the ability to create a note and redirect to the note's contact vi...

Java: How to get the caller function name

To fix a test case I need to identify whether the function is called from a particular caller function. I can't afford to add a boolean parameter because it would break the interfaces defined. How to go about this? This is what I want to achieve. Here I can't change the parameters of operation() as it is an interface implementation. op...

South django.db.utils.IntegrityError: django_content_type.name may not be NULL while running unit tests

I'm getting this error django.db.utils.IntegrityError: django_content_type.name may not be NULL while running tests via nosetest. I've done everything as told in south tutorial - initial migration, fake migration etc. Running site normally via runserver command works like charm, but while using test command - above error. Also, In my d...