Rails overrides the setup method, and this is where the fixtures are loaded (ie before the code in test_global_weirdness runs). This causes invitation.rb to be loaded. At this point $site_id is not set and so when scoped_methods << {:find => { :conditions => [ 'site_id = ?',$site_id ] } } is evaluated, $site_id is nil. If you don't have invitations as a fixture, then invitation.rb is only loaded when Invitation is used, i.e. after you've set $site_id. So it's not that fixtures are clobbering anything. You'll also have problems if different tests try to set $site_id to different values. Fundamentally this approach seems unwise. If you absolutely had to, you could set $site_id in test_helper.rb
Fred