Sha256: 0fbe45495400e06f62fc5541f0d3d4c905f4b86b9df1861e986c39a30259fbc9
Contents?: true
Size: 1.05 KB
Versions: 91
Compression:
Stored size: 1.05 KB
Contents
require 'test_helper' class RenderTemplateMatcherTest < ActionController::TestCase # :nodoc: context "a controller that renders a template" do setup do @controller = build_response(:action => 'show') { render } end should "accept rendering that template" do assert_accepts render_template(:show), @controller end should "reject rendering a different template" do assert_rejects render_template(:index), @controller end should "accept rendering that template in the given context" do assert_accepts self.class.render_template(:show).in_context(self), @controller end should "reject rendering a different template in the given context" do assert_rejects self.class.render_template(:index).in_context(self), @controller end end context "a controller that doesn't render a template" do setup do @controller = build_response { render :nothing => true } end should "reject rendering a template" do assert_rejects render_template(:show), @controller end end end
Version data entries
91 entries across 61 versions & 10 rubygems