Sha256: 884fcfe4fa92116da61028a0438b4f6cdb8d6034c743bf31e7237cc28893dcb8
Contents?: true
Size: 539 Bytes
Versions: 16
Compression:
Stored size: 539 Bytes
Contents
require 'rails_helper' RSpec.describe 'Index overriding', type: :controller do before do load_resources { ActiveAdmin.register Post } @controller = Admin::PostsController.new @controller.instance_eval do def index super do render ActiveAdmin::Dependency.rails.render_key => 'Rendered from passed block' return end end end end it 'should call block passed to overridden index' do get :index expect(response.body).to eq 'Rendered from passed block' end end
Version data entries
16 entries across 16 versions & 3 rubygems