From 602c59505e5125b8d8ec911189d537fbf1cec42b Mon Sep 17 00:00:00 2001 From: Vladimir Sharshov Date: Tue, 13 Dec 2011 13:20:11 +0400 Subject: [PATCH] Fix #8. Add pretty view for test listing, fix "mount ---", fix warning --- .rspec | 2 +- spec/controllers/build_lists_controller_spec.rb | 8 +++++++- spec/controllers/platforms_controller_spec.rb | 4 ++-- 3 files changed, 10 insertions(+), 4 deletions(-) diff --git a/.rspec b/.rspec index 53607ea52..48412b546 100644 --- a/.rspec +++ b/.rspec @@ -1 +1 @@ ---colour +--colour --format doc diff --git a/spec/controllers/build_lists_controller_spec.rb b/spec/controllers/build_lists_controller_spec.rb index a8f00c9e5..ddc4e3ef3 100644 --- a/spec/controllers/build_lists_controller_spec.rb +++ b/spec/controllers/build_lists_controller_spec.rb @@ -35,10 +35,16 @@ describe BuildListsController do end context 'filter' do + + before(:each) do + stub_rsync_methods + set_session_for Factory(:admin) + end + let(:build_list1) { Factory(:build_list_core) } let(:build_list2) { 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 get :all, :filter => {:bs_id => build_list1.bs_id, :project_name => 'fdsfdf', :any_other_field => 'do not matter'} diff --git a/spec/controllers/platforms_controller_spec.rb b/spec/controllers/platforms_controller_spec.rb index a0e81f387..888b7b217 100644 --- a/spec/controllers/platforms_controller_spec.rb +++ b/spec/controllers/platforms_controller_spec.rb @@ -43,8 +43,8 @@ describe PlatformsController do @user = Factory(:user) set_session_for(@admin) any_instance_of(Platform) do |plat| - stub(plat).mount_directory_for_rsync {|args| true} - stub(plat).umount_directory_for_rsync {|args| true} + stub(plat).mount_directory_for_rsync {true} + stub(plat).umount_directory_for_rsync {true} end # any_instance_of(Platform).umount_directory_for_rsync{true} end