Permalink
Browse files

Added shouts

  • Loading branch information...
1 parent 86e4388 commit b716dc9850265c38652d5ee884576f384fb86918 @halogenandtoast committed Apr 2, 2012
Showing with 30 additions and 0 deletions.
  1. +3 −0 app/models/shout.rb
  2. +11 −0 db/migrate/20120402150227_create_shouts.rb
  3. +9 −0 test/fixtures/shouts.yml
  4. +7 −0 test/unit/shout_test.rb
View
3 app/models/shout.rb
@@ -0,0 +1,3 @@
+class Shout < ActiveRecord::Base
+ belongs_to :user
+end
View
11 db/migrate/20120402150227_create_shouts.rb
@@ -0,0 +1,11 @@
+class CreateShouts < ActiveRecord::Migration
+ def change
+ create_table :shouts do |t|
+ t.string :body
+ t.belongs_to :user
+
+ t.timestamps
+ end
+ add_index :shouts, :user_id
+ end
+end
View
9 test/fixtures/shouts.yml
@@ -0,0 +1,9 @@
+# Read about fixtures at http://api.rubyonrails.org/classes/ActiveRecord/Fixtures.html
+
+one:
+ body: MyString
+ user:
+
+two:
+ body: MyString
+ user:
View
7 test/unit/shout_test.rb
@@ -0,0 +1,7 @@
+require 'test_helper'
+
+class ShoutTest < ActiveSupport::TestCase
+ # test "the truth" do
+ # assert true
+ # end
+end

0 comments on commit b716dc9

Please sign in to comment.