Module: RSpec::Rails::ViewRendering
- Extended by:
- ActiveSupport::Concern
- Included in:
- ControllerExampleGroup
- Defined in:
- lib/rspec/rails/view_rendering.rb
Overview
Helpers for optionally rendering views in controller specs.
Defined Under Namespace
Modules: ClassMethods
Instance Attribute Summary collapse
-
#controller ⇒ Object
readonly
Returns the controller object instance under test.
Instance Method Summary collapse
- #render_views? ⇒ Boolean private
Instance Attribute Details
#controller ⇒ Object
Returns the controller object instance under test.
12 13 14 |
# File 'lib/rspec/rails/view_rendering.rb', line 12 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.
38 39 40 |
# File 'lib/rspec/rails/view_rendering.rb', line 38 def render_views? self.class.render_views? || !controller.class.respond_to?(:view_paths) end |