diff --git a/spec/helpers/action_view_extension_spec.rb b/spec/helpers/action_view_extension_spec.rb index 59650f8..b050af5 100644 --- a/spec/helpers/action_view_extension_spec.rb +++ b/spec/helpers/action_view_extension_spec.rb @@ -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}"} diff --git a/spec/helpers/helpers_spec.rb b/spec/helpers/helpers_spec.rb index bd03db0..15e6bc9 100644 --- a/spec/helpers/helpers_spec.rb +++ b/spec/helpers/helpers_spec.rb @@ -9,6 +9,7 @@ describe 'Kaminari::Helpers::Paginator' do options { {} } url_for {|h| "/foo?page=#{h[:page]}"} link_to { "link" } + output_buffer { defined?(ActionView) ? ::ActionView::OutputBuffer.new : ::ActiveSupport::SafeBuffer.new } end r end