Module: RSpec::Rails::ControllerExampleGroup::InstanceMethods
- Defined in:
- lib/rspec/rails/example/controller_example_group.rb
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
147 148 149 150 151 152 153 |
# File 'lib/rspec/rails/example/controller_example_group.rb', line 147 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.
145 146 147 |
# File 'lib/rspec/rails/example/controller_example_group.rb', line 145 def controller @controller end |
#routes ⇒ Object (readonly)
Returns the value of attribute routes.
145 146 147 |
# File 'lib/rspec/rails/example/controller_example_group.rb', line 145 def routes @routes end |