Add AR integration tests

This commit is contained in:
Santiago Pastorino
2013-08-16 19:23:23 -03:00
parent 4c7599cfff
commit fa61314d0e
2 changed files with 38 additions and 6 deletions

View File

@@ -6,15 +6,16 @@ ActiveRecord::Base.establish_connection(
)
ActiveRecord::Schema.define do
create_table :ar_models, :force => true do |t|
t.string :attr1
t.string :attr2
create_table :ar_profiles, :force => true do |t|
t.string :name
t.string :description
t.string :comments
end
end
class ARModel < ActiveRecord::Base
class ARProfile < ActiveRecord::Base
end
class ARModelSerializer < ActiveModel::Serializer
attributes :attr1, :attr2
class ARProfileSerializer < ActiveModel::Serializer
attributes :name, :description
end