snippets are ready
This commit is contained in:
parent
526ad466c8
commit
9265de3d25
28 changed files with 366 additions and 8 deletions
16
spec/models/snippet_spec.rb
Normal file
16
spec/models/snippet_spec.rb
Normal file
|
@ -0,0 +1,16 @@
|
|||
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
|
Loading…
Add table
Add a link
Reference in a new issue