Sha256: dd05580c76fa86198dff2de9ac751496c235c3a40a9e1cbfcfa8f0fcefe24e7e
Contents?: true
Size: 900 Bytes
Versions: 10
Compression:
Stored size: 900 Bytes
Contents
require File.join(File.dirname(__FILE__), '..', '..', 'test_helper') class RenderWithLayoutMatcherTest < Test::Unit::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
10 entries across 10 versions & 5 rubygems