snippets are ready

This commit is contained in:
gitlabhq 2011-10-17 00:07:10 +03:00
parent 526ad466c8
commit 9265de3d25
28 changed files with 366 additions and 8 deletions

View 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