Class Tests::PretendController
In: app/controllers/tests/pretend_controller.rb
Parent: ApplicationController

This class exists to provide a test for including page behavior in controllers. I didn‘t know of a way to add functional tests for controllers/routes that aren‘t in the apps directory.

This should be moved to the test directory if possible.

Methods

Included Modules

Cms::Acts::ContentPage

Constants

RESTRICTED_H1 = "Restricted"

Public Instance methods

[Source]

    # File app/controllers/tests/pretend_controller.rb, line 21
21:   def error
22:     raise StandardError     
23:   end

[Source]

    # File app/controllers/tests/pretend_controller.rb, line 25
25:   def not_found
26:     raise ActiveRecord::RecordNotFound.new("This thing was missing!")
27:   end

[Source]

    # File app/controllers/tests/pretend_controller.rb, line 17
17:   def open
18:     render :text =>"<h1>Open Page</h1> You can see this public page."   
19:   end

[Source]

    # File app/controllers/tests/pretend_controller.rb, line 29
29:   def open_with_layout
30:     render :layout=>"templates/subpage"
31:   end

[Source]

    # File app/controllers/tests/pretend_controller.rb, line 13
13:   def restricted
14:     render :text =>"<h1>#{RESTRICTED_H1}</h1> You can see this restricted page."
15:   end

[Validate]