[refs #438] Repair arch factory and rename rsync stub method

This commit is contained in:
konstantin.grabar 2012-05-16 19:29:28 +04:00
parent 208310e83b
commit da70a11aab
29 changed files with 32 additions and 32 deletions

View File

@ -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

View File

@ -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'}}

View File

@ -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')

View File

@ -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

View File

@ -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)

View File

@ -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)

View File

@ -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

View File

@ -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)

View File

@ -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

View File

@ -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))

View File

@ -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)

View File

@ -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)

View File

@ -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)

View File

@ -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)

View File

@ -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']

View File

@ -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)

View File

@ -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

View File

@ -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)

View File

@ -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

View File

@ -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)

View File

@ -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)

View File

@ -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

View File

@ -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'])

View File

@ -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) }

View File

@ -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

View File

@ -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)

View File

@ -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

View File

@ -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)

View File

@ -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