Module: ViewSpec::DSL::Controller
- Extended by:
- ActiveSupport::Concern
- Defined in:
- lib/view_spec/dsl/controller.rb
Instance Method Summary collapse
Instance Method Details
#controller(value = nil) ⇒ Object
10 11 12 13 14 |
# File 'lib/view_spec/dsl/controller.rb', line 10 def controller(value = nil) @controller = value unless value.nil? controller = @controller || @outer_scope&.controller || ViewSpec.config.preview_controller controller.is_a?(String) ? controller.camelize.constantize : controller end |