class FriendlyId::Test::ScopedModelTest

Public Instance Methods

setup() click to toggle source
# File test/active_record2/scoped_model_test.rb, line 13
def setup
  @user = User.create!(:name => "john")
  @house = House.create!(:name => "123 Main", :user => @user)
  @usa = Country.create!(:name => "USA")
  @canada = Country.create!(:name => "Canada")
  @resident = Resident.create!(:name => "John Smith", :country => @usa)
  @resident2 = Resident.create!(:name => "John Smith", :country => @canada)
end
teardown() click to toggle source
# File test/active_record2/scoped_model_test.rb, line 22
def teardown
  Resident.delete_all
  Country.delete_all
  User.delete_all
  House.delete_all
  Slug.delete_all
end