aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/test/fixtures
diff options
context:
space:
mode:
Diffstat (limited to 'activerecord/test/fixtures')
-rw-r--r--activerecord/test/fixtures/db_definitions/schema.rb10
-rw-r--r--activerecord/test/fixtures/joke.rb3
-rw-r--r--activerecord/test/fixtures/matey.rb2
-rw-r--r--activerecord/test/fixtures/parrots.yml5
-rw-r--r--activerecord/test/fixtures/ship.rb3
-rw-r--r--activerecord/test/fixtures/ships.yml5
6 files changed, 23 insertions, 5 deletions
diff --git a/activerecord/test/fixtures/db_definitions/schema.rb b/activerecord/test/fixtures/db_definitions/schema.rb
index 9b6b6987d2..f6bd0efa5d 100644
--- a/activerecord/test/fixtures/db_definitions/schema.rb
+++ b/activerecord/test/fixtures/db_definitions/schema.rb
@@ -335,10 +335,18 @@ ActiveRecord::Schema.define do
t.column :parrot_id, :integer
t.column :treasure_id, :integer
end
-
+
create_table :mateys, :id => false, :force => true do |t|
t.column :pirate_id, :integer
t.column :target_id, :integer
t.column :weight, :integer
end
+
+ create_table :ships, :force => true do |t|
+ t.string :name
+ t.datetime :created_at
+ t.datetime :created_on
+ t.datetime :updated_at
+ t.datetime :updated_on
+ end
end
diff --git a/activerecord/test/fixtures/joke.rb b/activerecord/test/fixtures/joke.rb
index 8006a43bd7..3978abc2ba 100644
--- a/activerecord/test/fixtures/joke.rb
+++ b/activerecord/test/fixtures/joke.rb
@@ -1,6 +1,3 @@
class Joke < ActiveRecord::Base
set_table_name 'funny_jokes'
end
-class Joke < ActiveRecord::Base
- set_table_name 'funny_jokes'
-end \ No newline at end of file
diff --git a/activerecord/test/fixtures/matey.rb b/activerecord/test/fixtures/matey.rb
index 86442e0470..47b0baa974 100644
--- a/activerecord/test/fixtures/matey.rb
+++ b/activerecord/test/fixtures/matey.rb
@@ -1,4 +1,4 @@
class Matey < ActiveRecord::Base
belongs_to :pirate
- belongs_to :target, :class_name => 'Pirate', :foreign_key => 'target_id'
+ belongs_to :target, :class_name => 'Pirate'
end
diff --git a/activerecord/test/fixtures/parrots.yml b/activerecord/test/fixtures/parrots.yml
index 74bc6b4e78..dd2c9548e7 100644
--- a/activerecord/test/fixtures/parrots.yml
+++ b/activerecord/test/fixtures/parrots.yml
@@ -9,6 +9,11 @@ louis:
frederick:
name: $LABEL
+polly:
+ id: 4
+ name: $LABEL
+ treasures: sapphire, ruby
+
DEFAULTS: &DEFAULTS
treasures: sapphire, ruby
diff --git a/activerecord/test/fixtures/ship.rb b/activerecord/test/fixtures/ship.rb
new file mode 100644
index 0000000000..05b09fc1b9
--- /dev/null
+++ b/activerecord/test/fixtures/ship.rb
@@ -0,0 +1,3 @@
+class Ship < ActiveRecord::Base
+ self.record_timestamps = false
+end \ No newline at end of file
diff --git a/activerecord/test/fixtures/ships.yml b/activerecord/test/fixtures/ships.yml
new file mode 100644
index 0000000000..137055aad1
--- /dev/null
+++ b/activerecord/test/fixtures/ships.yml
@@ -0,0 +1,5 @@
+black_pearl:
+ name: "Black Pearl"
+interceptor:
+ id: 2
+ name: "Interceptor"