1.1pre1
This commit is contained in:
parent
3a2b273316
commit
6b030fd41d
83 changed files with 1089 additions and 136 deletions
|
@ -38,5 +38,6 @@ end
|
|||
# created_at :datetime
|
||||
# updated_at :datetime
|
||||
# closed :boolean default(FALSE), not null
|
||||
# position :integer default(0)
|
||||
#
|
||||
|
||||
|
|
30
spec/models/snippet_spec.rb
Normal file
30
spec/models/snippet_spec.rb
Normal file
|
@ -0,0 +1,30 @@
|
|||
require 'spec_helper'
|
||||
|
||||
describe Snippet do
|
||||
describe "Associations" do
|
||||
it { should belong_to(:project) }
|
||||
it { should belong_to(:author) }
|
||||
end
|
||||
|
||||
describe "Validation" do
|
||||
it { should validate_presence_of(:title) }
|
||||
it { should validate_presence_of(:author_id) }
|
||||
it { should validate_presence_of(:project_id) }
|
||||
it { should validate_presence_of(:file_name) }
|
||||
it { should validate_presence_of(:content) }
|
||||
end
|
||||
end
|
||||
# == Schema Information
|
||||
#
|
||||
# Table name: snippets
|
||||
#
|
||||
# id :integer not null, primary key
|
||||
# title :string(255)
|
||||
# content :text
|
||||
# author_id :integer not null
|
||||
# project_id :integer not null
|
||||
# created_at :datetime
|
||||
# updated_at :datetime
|
||||
# file_name :string(255)
|
||||
#
|
||||
|
|
@ -39,5 +39,8 @@ end
|
|||
# name :string(255)
|
||||
# admin :boolean default(FALSE), not null
|
||||
# projects_limit :integer
|
||||
# skype :string
|
||||
# linkedin :string
|
||||
# twitter :string
|
||||
#
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue