Skip to content

Commit 3dfe88a

Browse files
cuong-nowctran
authored andcommitted
Add nested models to integration test project (#200)
1 parent 425d12b commit 3dfe88a

File tree

6 files changed

+36
-3
lines changed

6 files changed

+36
-3
lines changed
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
module Sub1::Sub2::Sub3
2+
class Event < ActiveRecord::Base
3+
end
4+
end
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
class Sub1::User < ActiveRecord::Base
2+
end

spec/integration/rails_4.1.1/db/migrate/20140526224112_create_tasks.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ class CreateTasks < ActiveRecord::Migration
22
def change
33
create_table :tasks do |t|
44
t.string :content
5-
t.column :status, default: 0
5+
t.column :status, :default => 0
66
t.timestamps
77
end
88
end
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
class CreateEvents < ActiveRecord::Migration
2+
def change
3+
create_table :events do |t|
4+
t.string :content
5+
t.timestamps
6+
end
7+
end
8+
end
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
class CreateUsers < ActiveRecord::Migration
2+
def change
3+
create_table :users do |t|
4+
t.string :content
5+
t.timestamps
6+
end
7+
end
8+
end

spec/integration/rails_4.1.1/db/schema.rb

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,11 +11,22 @@
1111
#
1212
# It's strongly recommended that you check this file into your version control system.
1313

14-
ActiveRecord::Schema.define(version: 20140526224112) do
14+
ActiveRecord::Schema.define(version: 20140705000010) do
15+
16+
create_table "events", force: true do |t|
17+
t.string "content"
18+
t.datetime "created_at"
19+
t.datetime "updated_at"
20+
end
1521

1622
create_table "tasks", force: true do |t|
1723
t.string "content"
18-
t.integer "status"
24+
t.datetime "created_at"
25+
t.datetime "updated_at"
26+
end
27+
28+
create_table "users", force: true do |t|
29+
t.string "content"
1930
t.datetime "created_at"
2031
t.datetime "updated_at"
2132
end

0 commit comments

Comments
 (0)