From d1555fa1775100535cb059c51dc75ecaff96b27c Mon Sep 17 00:00:00 2001 From: Alexander Machehin Date: Fri, 28 Jun 2013 22:15:17 +0600 Subject: [PATCH] [#105] small spec refactoring --- spec/controllers/api/v1/issues_controller_spec.rb | 2 +- spec/controllers/api/v1/pull_requests_controller.rb | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/spec/controllers/api/v1/issues_controller_spec.rb b/spec/controllers/api/v1/issues_controller_spec.rb index 710b5410c..4b60910f7 100644 --- a/spec/controllers/api/v1/issues_controller_spec.rb +++ b/spec/controllers/api/v1/issues_controller_spec.rb @@ -75,7 +75,7 @@ describe Api::V1::IssuesController do it 'should return only assigned issue' do get :user_index, :format => :json assigns[:issues].should include(@own_hidden_issue) - assigns[:issues].count.should == 1 + assigns[:issues].should have(1).item end it 'should render right template for user index action' do diff --git a/spec/controllers/api/v1/pull_requests_controller.rb b/spec/controllers/api/v1/pull_requests_controller.rb index e7bcd8aad..f7e1c9ea9 100644 --- a/spec/controllers/api/v1/pull_requests_controller.rb +++ b/spec/controllers/api/v1/pull_requests_controller.rb @@ -86,7 +86,7 @@ describe Api::V1::PullRequestsController do it 'should return only assigned pull request' do get :user_index, :format => :json assigns[:pulls].should include(@own_hidden_pull) - assigns[:pulls].count.should == 1 + assigns[:pulls].should have(1).item end it 'should render right template for user index action' do