Class: RenderSpecController

Inherits:
ApplicationController show all
Defined in:
lib/vendor/plugins/rspec-rails/spec/resources/controllers/render_spec_controller.rb

Instance Method Summary collapse

Instance Method Details

#action_that_renders_nothingObject



27
28
29
# File 'lib/vendor/plugins/rspec-rails/spec/resources/controllers/render_spec_controller.rb', line 27

def action_that_renders_nothing
  render :nothing => true
end

#action_which_renders_template_from_other_controllerObject



11
12
13
# File 'lib/vendor/plugins/rspec-rails/spec/resources/controllers/render_spec_controller.rb', line 11

def action_which_renders_template_from_other_controller
  render :template => 'controller_spec/action_with_template'
end

#action_with_alternate_layoutObject



31
32
33
# File 'lib/vendor/plugins/rspec-rails/spec/resources/controllers/render_spec_controller.rb', line 31

def action_with_alternate_layout
  render :layout => 'simple'
end

#action_with_partialObject



23
24
25
# File 'lib/vendor/plugins/rspec-rails/spec/resources/controllers/render_spec_controller.rb', line 23

def action_with_partial
  render :partial => "a_partial"
end

#action_with_redirectObject



19
20
21
# File 'lib/vendor/plugins/rspec-rails/spec/resources/controllers/render_spec_controller.rb', line 19

def action_with_redirect
  redirect_to :action => :some_action
end

#some_actionObject



4
5
6
7
8
9
# File 'lib/vendor/plugins/rspec-rails/spec/resources/controllers/render_spec_controller.rb', line 4

def some_action
  respond_to do |format|
    format.html
    format.js
  end
end

#text_actionObject



15
16
17
# File 'lib/vendor/plugins/rspec-rails/spec/resources/controllers/render_spec_controller.rb', line 15

def text_action
  render :text => "this is the text for this action"
end