diff --git a/spec/controllers/exercises_controller_spec.rb b/spec/controllers/exercises_controller_spec.rb index fe79e849..2c653210 100644 --- a/spec/controllers/exercises_controller_spec.rb +++ b/spec/controllers/exercises_controller_spec.rb @@ -268,11 +268,11 @@ describe ExercisesController do context 'when viewing the default submission statistics page without a parameter' do it 'does not list autosaved submissions' do perform_request - expect(assigns(:all_events).filter {|event| event.is_a? Submission }).to match_array [ + expect(assigns(:all_events).filter {|event| event.is_a? Submission }).to contain_exactly( an_object_having_attributes(cause: 'run', user_id: external_user.id), an_object_having_attributes(cause: 'assess', user_id: external_user.id), - an_object_having_attributes(cause: 'run', user_id: external_user.id), - ] + an_object_having_attributes(cause: 'run', user_id: external_user.id) + ) end end diff --git a/spec/controllers/request_for_comments_controller_spec.rb b/spec/controllers/request_for_comments_controller_spec.rb index 556f448a..39277eab 100644 --- a/spec/controllers/request_for_comments_controller_spec.rb +++ b/spec/controllers/request_for_comments_controller_spec.rb @@ -37,7 +37,7 @@ describe RequestForCommentsController do it 'shows all RfCs' do get :index - expect(assigns(:request_for_comments)).to match_array([rfc_other_consumer, rfc_other_study_group, rfc_peer]) + expect(assigns(:request_for_comments)).to contain_exactly(rfc_other_consumer, rfc_other_study_group, rfc_peer) end end @@ -46,7 +46,7 @@ describe RequestForCommentsController do it 'shows only RfCs of the same consumer' do get :index - expect(assigns(:request_for_comments)).to match_array([rfc_other_study_group, rfc_peer]) + expect(assigns(:request_for_comments)).to contain_exactly(rfc_other_study_group, rfc_peer) end end @@ -55,7 +55,7 @@ describe RequestForCommentsController do it 'shows only RfCs of the same study group' do get :index - expect(assigns(:request_for_comments)).to match_array([rfc_peer]) + expect(assigns(:request_for_comments)).to contain_exactly(rfc_peer) end end end