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:
parent
67846dbb74
commit
907cabe37f
2 changed files with 4 additions and 0 deletions
|
@ -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}"}
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue