diff options
author | Nihad Abbasov <narkoz.2008@gmail.com> | 2012-09-06 07:52:01 -0700 |
---|---|---|
committer | Nihad Abbasov <narkoz.2008@gmail.com> | 2012-09-06 07:52:01 -0700 |
commit | d861023cb9dc71b5943916fdd6011dab32085626 (patch) | |
tree | b2806b4649c18f7210e422a52e67f7f06fabe4fd /spec/factories_spec.rb | |
parent | 8c1b83cffe934ded9886a85a74447c0dae6c908e (diff) | |
download | gitlab-ce-d861023cb9dc71b5943916fdd6011dab32085626.tar.gz |
refactor factory specs
Diffstat (limited to 'spec/factories_spec.rb')
-rw-r--r-- | spec/factories_spec.rb | 90 |
1 files changed, 4 insertions, 86 deletions
diff --git a/spec/factories_spec.rb b/spec/factories_spec.rb index 5760aad423b..5ccc17bddc9 100644 --- a/spec/factories_spec.rb +++ b/spec/factories_spec.rb @@ -1,91 +1,9 @@ require 'spec_helper' -describe "Factories" do - describe 'User' do - it "builds a valid instance" do - build(:user).should be_valid - end - - it "builds a valid admin instance" do - build(:admin).should be_valid - end - end - - describe 'Project' do - it "builds a valid instance" do - build(:project).should be_valid - end - end - - describe 'Issue' do - it "builds a valid instance" do - build(:issue).should be_valid - end - - it "builds a valid closed instance" do - build(:closed_issue).should be_valid - end - end - - describe 'MergeRequest' do - it "builds a valid instance" do - build(:merge_request).should be_valid - end - end - - describe 'Note' do - it "builds a valid instance" do - build(:note).should be_valid - end - end - - describe 'Event' do - it "builds a valid instance" do - build(:event).should be_valid - end - end - - describe 'Key' do - it "builds a valid instance" do - build(:key).should be_valid - end - - it "builds a valid deploy key instance" do - build(:deploy_key).should be_valid - end - - it "builds a valid personal key instance" do - build(:personal_key).should be_valid - end - end - - describe 'Milestone' do - it "builds a valid instance" do - build(:milestone).should be_valid - end - end - - describe 'SystemHook' do - it "builds a valid instance" do - build(:system_hook).should be_valid - end - end - - describe 'ProjectHook' do - it "builds a valid instance" do - build(:project_hook).should be_valid - end - end - - describe 'Wiki' do - it "builds a valid instance" do - build(:wiki).should be_valid - end - end - - describe 'Snippet' do - it "builds a valid instance" do - build(:snippet).should be_valid +FactoryGirl.factories.map(&:name).each do |factory_name| + describe "#{factory_name} factory" do + it 'should be valid' do + build(factory_name).should be_valid end end end |