view test/exemplars/attachment_exemplar.rb @ 215:e65d8141194b feature_73

Or, we can just retrieve the external repo URL through the project...
author Chris Cannam <chris.cannam@soundsoftware.ac.uk>
date Thu, 10 Feb 2011 15:37:47 +0000
parents 1d32c0a0efbf
children
line wrap: on
line source
class Attachment < ActiveRecord::Base
  generator_for :container, :method => :generate_project
  generator_for :file, :method => :generate_file
  generator_for :author, :method => :generate_author

  def self.generate_project
    Project.generate!
  end

  def self.generate_author
    User.generate_with_protected!
  end

  def self.generate_file
    @file = ActiveSupport::TestCase.mock_file
  end
end