Sha256: aef51a4f9106c5134d4784b2d9995fa75512ff046cbb82477402ff2513400a0a
Contents?: true
Size: 906 Bytes
Versions: 38
Compression:
Stored size: 906 Bytes
Contents
require File.join(File.dirname(__FILE__), '..', '..', 'test_helper') class RenderWithLayoutMatcherTest < ActionController::TestCase # :nodoc: context "a controller that renders with a layout" do setup do @controller = build_response { render :layout => 'wide' } end should "accept rendering with any layout" do assert_accepts render_with_layout, @controller end should "accept rendering with that layout" do assert_accepts render_with_layout(:wide), @controller end should "reject rendering with another layout" do assert_rejects render_with_layout(:other), @controller end end context "a controller that renders without a layout" do setup do @controller = build_response { render :layout => false } end should "reject rendering with a layout" do assert_rejects render_with_layout, @controller end end end
Version data entries
38 entries across 38 versions & 10 rubygems