[refs #438] Repair arch factory and rename rsync stub method
This commit is contained in:
parent
208310e83b
commit
da70a11aab
|
@ -3,7 +3,7 @@ require 'spec_helper'
|
|||
|
||||
describe Groups::MembersController do
|
||||
before(:each) do
|
||||
stub_rsync_methods
|
||||
stub_symlink_methods
|
||||
@group = FactoryGirl.create(:group)
|
||||
@user = @group.owner
|
||||
set_session_for @user
|
||||
|
|
|
@ -69,7 +69,7 @@ end
|
|||
|
||||
describe Groups::ProfileController do
|
||||
before(:each) do
|
||||
stub_rsync_methods
|
||||
stub_symlink_methods
|
||||
@group = FactoryGirl.create(:group)
|
||||
@another_user = FactoryGirl.create(:user)
|
||||
@create_params = {:group => {:description => 'grp1', :uname => 'un_grp1'}}
|
||||
|
|
|
@ -35,7 +35,7 @@ end
|
|||
|
||||
describe Platforms::PlatformsController do
|
||||
before(:each) do
|
||||
stub_rsync_methods
|
||||
stub_symlink_methods
|
||||
|
||||
@platform = FactoryGirl.create(:platform)
|
||||
@personal_platform = FactoryGirl.create(:platform, :platform_type => 'personal')
|
||||
|
|
|
@ -26,7 +26,7 @@ end
|
|||
|
||||
describe Platforms::ProductBuildListsController do
|
||||
before(:each) do
|
||||
stub_rsync_methods
|
||||
stub_symlink_methods
|
||||
end
|
||||
|
||||
context 'crud' do
|
||||
|
|
|
@ -24,7 +24,7 @@ end
|
|||
|
||||
describe Platforms::ProductsController do
|
||||
before(:each) do
|
||||
stub_rsync_methods
|
||||
stub_symlink_methods
|
||||
|
||||
@another_user = FactoryGirl.create(:user)
|
||||
@platform = FactoryGirl.create(:platform)
|
||||
|
|
|
@ -67,7 +67,7 @@ end
|
|||
|
||||
describe Platforms::RepositoriesController do
|
||||
before(:each) do
|
||||
stub_rsync_methods
|
||||
stub_symlink_methods
|
||||
|
||||
@platform = FactoryGirl.create(:platform)
|
||||
@repository = FactoryGirl.create(:repository, :platform => @platform)
|
||||
|
|
|
@ -64,7 +64,7 @@ describe Projects::BuildListsController do
|
|||
end
|
||||
end
|
||||
|
||||
before { stub_rsync_methods }
|
||||
before { stub_symlink_methods }
|
||||
|
||||
context 'crud' do
|
||||
before(:each) do
|
||||
|
|
|
@ -64,7 +64,7 @@ end
|
|||
|
||||
describe Projects::CollaboratorsController do
|
||||
before(:each) do
|
||||
stub_rsync_methods
|
||||
stub_symlink_methods
|
||||
@project = FactoryGirl.create(:project)
|
||||
@another_user = FactoryGirl.create(:user)
|
||||
@member_user = FactoryGirl.create(:user)
|
||||
|
|
|
@ -76,7 +76,7 @@ end
|
|||
|
||||
describe Projects::CommentsController do
|
||||
before(:each) do
|
||||
stub_rsync_methods
|
||||
stub_symlink_methods
|
||||
@project = FactoryGirl.create(:project)
|
||||
%x(cp -Rf #{Rails.root}/spec/tests.git/* #{@project.git_repository.path}) # maybe FIXME ?
|
||||
@commit = @project.git_repository.commits.first
|
||||
|
|
|
@ -72,7 +72,7 @@ end
|
|||
|
||||
describe Projects::CommentsController do
|
||||
before(:each) do
|
||||
stub_rsync_methods
|
||||
stub_symlink_methods
|
||||
|
||||
@project = FactoryGirl.create(:project)
|
||||
@issue = FactoryGirl.create(:issue, :project_id => @project.id, :user => FactoryGirl.create(:user))
|
||||
|
|
|
@ -8,7 +8,7 @@ describe Projects::Git::TreesController do
|
|||
end
|
||||
|
||||
before(:each) do
|
||||
stub_rsync_methods
|
||||
stub_symlink_methods
|
||||
|
||||
@project = FactoryGirl.create(:project)
|
||||
@another_user = FactoryGirl.create(:user)
|
||||
|
|
|
@ -73,7 +73,7 @@ end
|
|||
|
||||
describe Projects::IssuesController do
|
||||
before(:each) do
|
||||
stub_rsync_methods
|
||||
stub_symlink_methods
|
||||
|
||||
@project = FactoryGirl.create(:project)
|
||||
@issue_user = FactoryGirl.create(:user)
|
||||
|
|
|
@ -4,7 +4,7 @@ require 'spec_helper'
|
|||
describe Projects::ProjectsController do
|
||||
|
||||
before(:each) do
|
||||
stub_rsync_methods
|
||||
stub_symlink_methods
|
||||
|
||||
@project = FactoryGirl.create(:project)
|
||||
@another_user = FactoryGirl.create(:user)
|
||||
|
|
|
@ -49,7 +49,7 @@ end
|
|||
|
||||
describe Projects::SubscribesController do
|
||||
before(:each) do
|
||||
stub_rsync_methods
|
||||
stub_symlink_methods
|
||||
|
||||
@project = FactoryGirl.create(:project)
|
||||
@issue = FactoryGirl.create(:issue, :project_id => @project.id)
|
||||
|
|
|
@ -16,7 +16,7 @@ shared_examples_for 'not able search' do
|
|||
end
|
||||
|
||||
describe SearchController do
|
||||
before { stub_rsync_methods }
|
||||
before { stub_symlink_methods }
|
||||
|
||||
context 'as guest' do
|
||||
if APP_CONFIG['anonymous_access']
|
||||
|
|
|
@ -3,7 +3,7 @@ require 'spec_helper'
|
|||
|
||||
describe Users::ProfileController do
|
||||
before(:each) do
|
||||
stub_rsync_methods
|
||||
stub_symlink_methods
|
||||
|
||||
@simple_user = FactoryGirl.create(:user)
|
||||
@other_user = FactoryGirl.create(:user)
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
# -*- encoding : utf-8 -*-
|
||||
FactoryGirl.define do
|
||||
factory :arch do
|
||||
name { FactoryGirl.generate(:string) }
|
||||
name { FactoryGirl.generate(:unixname) }
|
||||
end
|
||||
end
|
||||
|
|
|
@ -6,7 +6,7 @@ describe UserMailer do
|
|||
|
||||
context 'On Issue create' do
|
||||
before(:each) do
|
||||
stub_rsync_methods
|
||||
stub_symlink_methods
|
||||
|
||||
@project = FactoryGirl.create(:project)
|
||||
@issue_user = FactoryGirl.create(:user)
|
||||
|
@ -44,7 +44,7 @@ describe UserMailer do
|
|||
|
||||
context 'On Issue assign' do
|
||||
before(:each) do
|
||||
stub_rsync_methods
|
||||
stub_symlink_methods
|
||||
|
||||
@project = FactoryGirl.create(:project)
|
||||
@issue_user = FactoryGirl.create(:user)
|
||||
|
@ -80,7 +80,7 @@ describe UserMailer do
|
|||
|
||||
context 'On Comment create' do
|
||||
before(:each) do
|
||||
stub_rsync_methods
|
||||
stub_symlink_methods
|
||||
|
||||
@project = FactoryGirl.create(:project)
|
||||
@issue_user = FactoryGirl.create(:user)
|
||||
|
|
|
@ -25,7 +25,7 @@ describe CanCan do
|
|||
let(:register_request) { FactoryGirl.create(:register_request) }
|
||||
|
||||
before(:each) do
|
||||
stub_rsync_methods
|
||||
stub_symlink_methods
|
||||
end
|
||||
|
||||
context 'Site admin' do
|
||||
|
|
|
@ -23,7 +23,7 @@ def set_comments_data_for_commit
|
|||
end
|
||||
|
||||
describe Comment do
|
||||
before { stub_rsync_methods }
|
||||
before { stub_symlink_methods }
|
||||
context 'for global admin user' do
|
||||
before(:each) do
|
||||
@user = FactoryGirl.create(:admin)
|
||||
|
|
|
@ -15,7 +15,7 @@ def set_commentable_data
|
|||
end
|
||||
|
||||
describe Comment do
|
||||
before { stub_rsync_methods }
|
||||
before { stub_symlink_methods }
|
||||
context 'for global admin user' do
|
||||
before(:each) do
|
||||
@user = FactoryGirl.create(:admin)
|
||||
|
|
|
@ -4,7 +4,7 @@ require "cancan/matchers"
|
|||
|
||||
describe Group do
|
||||
before(:each) do
|
||||
stub_rsync_methods
|
||||
stub_symlink_methods
|
||||
@group = FactoryGirl.create(:group)
|
||||
@ability = Ability.new(User.new)
|
||||
end
|
||||
|
|
|
@ -3,7 +3,7 @@ require 'spec_helper'
|
|||
|
||||
describe Platform do
|
||||
before(:all) do
|
||||
stub_rsync_methods
|
||||
stub_symlink_methods
|
||||
Platform.delete_all
|
||||
User.delete_all
|
||||
FileUtils.rm_rf(APP_CONFIG['root_path'])
|
||||
|
|
|
@ -3,7 +3,7 @@ require 'spec_helper'
|
|||
|
||||
describe ProductBuildList do
|
||||
before(:all) do
|
||||
stub_rsync_methods
|
||||
stub_symlink_methods
|
||||
end
|
||||
|
||||
it { should belong_to(:product) }
|
||||
|
|
|
@ -3,7 +3,7 @@ require 'spec_helper'
|
|||
|
||||
describe Product do
|
||||
before(:all) do
|
||||
stub_rsync_methods
|
||||
stub_symlink_methods
|
||||
Platform.delete_all
|
||||
User.delete_all
|
||||
Product.delete_all
|
||||
|
|
|
@ -3,7 +3,7 @@ require 'spec_helper'
|
|||
|
||||
describe ProjectToRepository do
|
||||
before(:each) do
|
||||
stub_rsync_methods
|
||||
stub_symlink_methods
|
||||
@platform = FactoryGirl.create(:platform)
|
||||
@first_repo = FactoryGirl.create(:repository, :platform_id => @platform.id)
|
||||
@second_repo = FactoryGirl.create(:repository, :platform_id => @platform.id)
|
||||
|
|
|
@ -5,7 +5,7 @@ describe Repository do
|
|||
|
||||
context 'when create with same owner that platform' do
|
||||
before (:each) do
|
||||
stub_rsync_methods
|
||||
stub_symlink_methods
|
||||
@platform = FactoryGirl.create(:platform)
|
||||
@params = {:name => 'tst_platform', :description => 'test platform'}
|
||||
end
|
||||
|
@ -17,7 +17,7 @@ describe Repository do
|
|||
end
|
||||
|
||||
before(:all) do
|
||||
stub_rsync_methods
|
||||
stub_symlink_methods
|
||||
Platform.delete_all
|
||||
User.delete_all
|
||||
Repository.delete_all
|
||||
|
|
|
@ -12,7 +12,7 @@ def set_testable_data
|
|||
end
|
||||
|
||||
describe Subscribe do
|
||||
before { stub_rsync_methods }
|
||||
before { stub_symlink_methods }
|
||||
context 'for global admin user' do
|
||||
before(:each) do
|
||||
@user = FactoryGirl.create(:admin)
|
||||
|
|
|
@ -33,7 +33,7 @@ def set_session_for(user=nil)
|
|||
sign_in current_user
|
||||
end
|
||||
|
||||
def stub_rsync_methods
|
||||
def stub_symlink_methods
|
||||
any_instance_of(Platform, :symlink_directory => true)
|
||||
any_instance_of(Platform, :remove_symlink_directory => true)
|
||||
end
|
||||
|
|
Loading…
Reference in New Issue