Sha256: 5c3fcbf0dde1cfc54c268e1e325cb843d7ea2277ee5c119d7d7b16843d8f9305

Contents?: true

Size: 934 Bytes

Versions: 3

Compression:

Stored size: 934 Bytes

Contents

class ControllerSpecController < ActionController::Base
  set_view_path File.join(File.dirname(__FILE__), "..", "views")
  
  def some_action
    render :template => "template/that/does/not/actually/exist"
  end
  
  def action_with_template
    session[:session_key] = "session value"
    flash[:flash_key] = "flash value"
    render :template => "controller_spec/action_with_template"
  end
  
  def action_with_partial
    render :partial => "controller_spec/a_partial"
  end
  
  def action_with_errors_in_template
    render :template => "controller_spec/action_with_errors_in_template"
  end

  def action_setting_the_assigns_hash
    assigns['direct_assigns_key'] = :direct_assigns_key_value
  end

  def action_setting_flash_after_session_reset
    reset_session
    flash[:after_reset] = "available"
  end
  
  def action_setting_flash_before_session_reset
    flash[:before_reset] = 'available'
    reset_session
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
has_finder-0.1.1 spec/rails/vendor/plugins/rspec_on_rails/spec_resources/controllers/controller_spec_controller.rb
has_finder-0.1.2 spec/rails/vendor/plugins/rspec_on_rails/spec_resources/controllers/controller_spec_controller.rb
has_finder-0.1.3 spec/rails/vendor/plugins/rspec_on_rails/spec_resources/controllers/controller_spec_controller.rb