Fix #8. Add pretty view for test listing, fix "mount ---", fix warning

This commit is contained in:
Vladimir Sharshov 2011-12-13 13:20:11 +04:00
parent d66434ae43
commit 602c59505e
3 changed files with 10 additions and 4 deletions

2
.rspec
View File

@ -1 +1 @@
--colour --colour --format doc

View File

@ -35,10 +35,16 @@ describe BuildListsController do
end end
context 'filter' do context 'filter' do
before(:each) do
stub_rsync_methods
set_session_for Factory(:admin)
end
let(:build_list1) { Factory(:build_list_core) } let(:build_list1) { Factory(:build_list_core) }
let(:build_list2) { Factory(:build_list_core) } let(:build_list2) { Factory(:build_list_core) }
let(:build_list3) { Factory(:build_list_core) } let(:build_list3) { Factory(:build_list_core) }
before(:each) { set_session_for Factory(:admin) }
it 'should filter by bs_id' do it 'should filter by bs_id' do
get :all, :filter => {:bs_id => build_list1.bs_id, :project_name => 'fdsfdf', :any_other_field => 'do not matter'} get :all, :filter => {:bs_id => build_list1.bs_id, :project_name => 'fdsfdf', :any_other_field => 'do not matter'}

View File

@ -43,8 +43,8 @@ describe PlatformsController do
@user = Factory(:user) @user = Factory(:user)
set_session_for(@admin) set_session_for(@admin)
any_instance_of(Platform) do |plat| any_instance_of(Platform) do |plat|
stub(plat).mount_directory_for_rsync {|args| true} stub(plat).mount_directory_for_rsync {true}
stub(plat).umount_directory_for_rsync {|args| true} stub(plat).umount_directory_for_rsync {true}
end end
# any_instance_of(Platform).umount_directory_for_rsync{true} # any_instance_of(Platform).umount_directory_for_rsync{true}
end end