title: undefined method total_pages' for array will_paginate rspec
body: <p>I have added gem '<code>will_paginate</code>' and gem '<code>will_paginate-bootstrap</code>' to my app, and it  works fine. However I do get this error message due to RSpec test.</p>
  
  <pre><code>Failure/Error: render
       ActionView::Template::Error:
         undefined method `total_pages' for #&lt;User::ActiveRecord_Relation:0x007f8c238a97b8&gt;
  </code></pre>
  
  <p>This is the Rspec code:</p>
  
  <pre><code> it "renders a list of users" do
      render
  
      page = Capybara::Node::Simple.new(rendered)
  
      expect(page).to have_content("Smith, Agent admin@somewhere.com Site Admin")
      expect(page).to have_content("Johnson, Bob manager.email@elsewhere.com The Company Name")
    end
  </code></pre>
  
  <p>users_controller.rb</p>
  
  <pre><code>def index
      @per_page = params[:per_page] || 10
      @users = User.paginate(:page =&gt; params[:page], :per_page =&gt; @per_page).order('last_name  ASC')
  end
  </code></pre>
  
  <p>The index.html.erb</p>
  
  <pre><code>&lt;div class="pull-right"&gt;
    Records per page
    &lt;%= select_tag :per_page, options_for_select([10,25,50,100], params[:per_page].to_i),
         :onchange =&gt; "if(this.value){window.location='?per_page='+this.value;}" %&gt;
  &lt;/div&gt;
  
  &lt;%= page_entries_info @users %&gt;
  
  &lt;br&gt;
  &lt;div class="pull-right"&gt;
    &lt;%= will_paginate @users, renderer: BootstrapPagination::Rails %&gt;
  &lt;/div&gt;
  </code></pre>