Class: RailsProof::ControllerTestPlan
- Inherits:
-
Object
- Object
- RailsProof::ControllerTestPlan
- Defined in:
- lib/rails_proof/controller_test_plan.rb
Instance Attribute Summary collapse
-
#inspector ⇒ Object
readonly
Returns the value of attribute inspector.
Instance Method Summary collapse
- #concerns ⇒ Object
- #count ⇒ Object
-
#initialize(inspector) ⇒ ControllerTestPlan
constructor
A new instance of ControllerTestPlan.
Constructor Details
#initialize(inspector) ⇒ ControllerTestPlan
Returns a new instance of ControllerTestPlan.
5 6 7 |
# File 'lib/rails_proof/controller_test_plan.rb', line 5 def initialize(inspector) @inspector = inspector end |
Instance Attribute Details
#inspector ⇒ Object (readonly)
Returns the value of attribute inspector.
3 4 5 |
# File 'lib/rails_proof/controller_test_plan.rb', line 3 def inspector @inspector end |
Instance Method Details
#concerns ⇒ Object
9 10 11 12 13 14 15 16 17 18 19 20 21 22 |
# File 'lib/rails_proof/controller_test_plan.rb', line 9 def concerns @concerns ||= inspector.routes.filter_map do |route| next if route[:name].to_s.empty? { type: :controller_response, verb: route[:verb], path: route[:path], route_name: route[:name], action: route[:action], description: "#{route[:verb]} #{route[:path]} responds successfully" } end end |
#count ⇒ Object
24 25 26 |
# File 'lib/rails_proof/controller_test_plan.rb', line 24 def count concerns.count end |