Module: RSpec::Rails::ViewRendering Private

Extended by:
ActiveSupport::Concern
Included in:
ControllerExampleGroup
Defined in:
lib/rspec/rails/view_rendering.rb

Overview

This module is part of a private API. You should avoid using this module if possible, as it may be removed or be changed in the future.

Helpers for optionally rendering views in controller specs.

Defined Under Namespace

Modules: ClassMethods

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#controllerObject

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.



9
10
11
# File 'lib/rspec/rails/view_rendering.rb', line 9

def controller
  @controller
end

Instance Method Details

#render_views?Boolean

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

Returns:

  • (Boolean)


31
32
33
# File 'lib/rspec/rails/view_rendering.rb', line 31

def render_views?
  self.class.render_views? || !controller.class.respond_to?(:view_paths)
end