Sha256: 459cf2f836737e28f3d414a6aeb95854747a904d70e0e0bc956ef10de819421e

Contents?: true

Size: 770 Bytes

Versions: 1

Compression:

Stored size: 770 Bytes

Contents

require 'minitest/autorun'
require 'bundler'

Bundler.setup

# Configure Rails
ENV["RAILS_ENV"] = "test"

require 'active_support'
require 'action_controller'
require 'minitest/reporters'
MiniTest::Reporters.use!

require 'paginate-responder'

Responders::Routes = ActionDispatch::Routing::RouteSet.new
Responders::Routes.draw do
  match '/index' => 'paginate#index'
end

class ActiveSupport::TestCase
  setup do
    @routes = Responders::Routes
  end
end

class TestResponder < ActionController::Responder
  include Responders::PaginateResponder
end

class PaginateController < ActionController::Base
  attr_accessor :resource
  include Responders::Routes.url_helpers
  self.responder = TestResponder
  respond_to :json

  def index
    respond_with resource
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
paginate-responder-1.2.0 test/test_helper.rb