need add line require 'fixtures/fixtures' in your environment.rb
active_record_object.to_hash will convert object to hash
active_record_object.to_fixtures will add fixtures to test/fixtures/table_name.yml