Module: RSpec::Rails::ControllerExampleGroup::InstanceMethods
- Defined in:
- lib/rspec/rails/example/controller_example_group.rb
Defined Under Namespace
Modules: BypassRescue
Instance Attribute Summary collapse
-
#controller ⇒ Object
readonly
Returns the value of attribute controller.
-
#routes ⇒ Object
readonly
Returns the value of attribute routes.
Instance Method Summary collapse
Dynamic Method Handling
This class handles dynamic methods through the method_missing method
#method_missing(method, *args, &block) ⇒ Object
165 166 167 168 169 170 171 |
# File 'lib/rspec/rails/example/controller_example_group.rb', line 165 def method_missing(method, *args, &block) if @orig_routes && @orig_routes.named_routes.helpers.include?(method) controller.send(method, *args, &block) else super end end |
Instance Attribute Details
#controller ⇒ Object (readonly)
Returns the value of attribute controller.
153 154 155 |
# File 'lib/rspec/rails/example/controller_example_group.rb', line 153 def controller @controller end |
#routes ⇒ Object (readonly)
Returns the value of attribute routes.
153 154 155 |
# File 'lib/rspec/rails/example/controller_example_group.rb', line 153 def routes @routes end |
Instance Method Details
#bypass_rescue ⇒ Object
161 162 163 |
# File 'lib/rspec/rails/example/controller_example_group.rb', line 161 def bypass_rescue controller.extend(BypassRescue) end |