1
0
Fork 0
mirror of https://github.com/kaminari/kaminari.git synced 2022-11-09 13:44:37 -05:00

We need an AV::OutputBuffer for the helper tests

This commit is contained in:
Akira Matsuda 2016-06-22 19:13:56 +09:00
parent 67846dbb74
commit 907cabe37f
2 changed files with 4 additions and 0 deletions

View file

@ -1,6 +1,9 @@
require 'spec_helper'
describe 'Kaminari::ActionViewExtension', :if => defined?(::Rails::Railtie) do
before do
helper.output_buffer = ::ActionView::OutputBuffer.new
end
describe '#paginate' do
before do
50.times {|i| User.create! :name => "user#{i}"}

View file

@ -9,6 +9,7 @@ describe 'Kaminari::Helpers::Paginator' do
options { {} }
url_for {|h| "/foo?page=#{h[:page]}"}
link_to { "<a href='#'>link</a>" }
output_buffer { defined?(ActionView) ? ::ActionView::OutputBuffer.new : ::ActiveSupport::SafeBuffer.new }
end
r
end