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.