Silence 'instance variable undefined' warnings

These changes silence ruby interpreter warnings about undefined instance variables that can fill up the output and slow down tests considerably.
Merge pull request #425 from sriedel/patch-1

Silence 'instance variable undefined' warnings