Sha256: 95d1a642dcf69eddb4661dceb24b6ff17e66793e154682d8e19f8e79b5a59c2d
Contents?: true
Size: 704 Bytes
Versions: 17
Compression:
Stored size: 704 Bytes
Contents
require 'spec_helper' if ruby? class TestController < ActionController::Base; end RSpec.describe TestController, type: :controller do render_views describe '#render_component' do controller do layout "test_layout" def index render_component end def new render_component "Index", {}, layout: :explicit_layout end end it 'renders with the default layout' do get :index, no_prerender: true expect(response).to render_template(layout: :test_layout) end it "renders with a specified layout" do get :new, no_prerender: true expect(response).to render_template(layout: :explicit_layout) end end end end
Version data entries
17 entries across 17 versions & 2 rubygems