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