Skip to content

Commit

Permalink
Prefer models in helper.
Browse files Browse the repository at this point in the history
  • Loading branch information
metaskills committed Sep 24, 2008
1 parent 484ab36 commit ade289e
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 27 deletions.
27 changes: 26 additions & 1 deletion test/helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
require 'factory_girl'
require 'lib/test_case'
require 'grouped_scope'
require 'models'

class GroupedScope::TestCase

Expand Down Expand Up @@ -51,3 +50,29 @@ def setup_database(options)

end

class Employee < ActiveRecord::Base
has_many :reports
grouped_scope :reports
end

class Report < ActiveRecord::Base
belongs_to :employee
end

class LegacyEmployee < ActiveRecord::Base
set_primary_key :email
has_many :reports, :class_name => 'LegacyReport', :foreign_key => 'email'
grouped_scope :reports
end

class LegacyReport < ActiveRecord::Base
belongs_to :employee, :class_name => 'LegacyEmployee'
end

class FooBar < ActiveRecord::Base
has_many :reports
grouped_scope :reports
end



26 changes: 0 additions & 26 deletions test/models.rb

This file was deleted.

0 comments on commit ade289e

Please sign in to comment.