From 2b9589907163dc25a09c83a106b541d8060c9956 Mon Sep 17 00:00:00 2001 From: Dan Buch Date: Tue, 9 Aug 2011 21:38:51 -0400 Subject: [PATCH] adding the user model for 15.8 --- cookbook/015/hodgepodge/app/models/user.rb | 2 ++ .../db/migrate/20110810013840_create_users.rb | 12 ++++++++++++ cookbook/015/hodgepodge/test/fixtures/users.yml | 11 +++++++++++ cookbook/015/hodgepodge/test/unit/user_test.rb | 8 ++++++++ 4 files changed, 33 insertions(+) create mode 100644 cookbook/015/hodgepodge/app/models/user.rb create mode 100644 cookbook/015/hodgepodge/db/migrate/20110810013840_create_users.rb create mode 100644 cookbook/015/hodgepodge/test/fixtures/users.yml create mode 100644 cookbook/015/hodgepodge/test/unit/user_test.rb diff --git a/cookbook/015/hodgepodge/app/models/user.rb b/cookbook/015/hodgepodge/app/models/user.rb new file mode 100644 index 0000000..4a57cf0 --- /dev/null +++ b/cookbook/015/hodgepodge/app/models/user.rb @@ -0,0 +1,2 @@ +class User < ActiveRecord::Base +end diff --git a/cookbook/015/hodgepodge/db/migrate/20110810013840_create_users.rb b/cookbook/015/hodgepodge/db/migrate/20110810013840_create_users.rb new file mode 100644 index 0000000..9199bb3 --- /dev/null +++ b/cookbook/015/hodgepodge/db/migrate/20110810013840_create_users.rb @@ -0,0 +1,12 @@ +class CreateUsers < ActiveRecord::Migration + def self.up + create_table :users do |t| + + t.timestamps + end + end + + def self.down + drop_table :users + end +end diff --git a/cookbook/015/hodgepodge/test/fixtures/users.yml b/cookbook/015/hodgepodge/test/fixtures/users.yml new file mode 100644 index 0000000..2893341 --- /dev/null +++ b/cookbook/015/hodgepodge/test/fixtures/users.yml @@ -0,0 +1,11 @@ +# Read about fixtures at http://ar.rubyonrails.org/classes/Fixtures.html + +# This model initially had no columns defined. If you add columns to the +# model remove the '{}' from the fixture names and add the columns immediately +# below each fixture, per the syntax in the comments below +# +one: {} +# column: value +# +two: {} +# column: value diff --git a/cookbook/015/hodgepodge/test/unit/user_test.rb b/cookbook/015/hodgepodge/test/unit/user_test.rb new file mode 100644 index 0000000..a64d2d3 --- /dev/null +++ b/cookbook/015/hodgepodge/test/unit/user_test.rb @@ -0,0 +1,8 @@ +require 'test_helper' + +class UserTest < ActiveSupport::TestCase + # Replace this with your real tests. + test "the truth" do + assert true + end +end