We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 88f3a91 commit 6397dc3Copy full SHA for 6397dc3
lib/routes_coverage.rb
@@ -137,6 +137,10 @@ def self._collect_route_groups(all_routes)
137
case key
138
when :path
139
route.path.spec.to_s =~ value
140
+ when :action
141
+ route.requirements[:action]&.match(value)
142
+ when :controller
143
+ route.requirements[:controller]&.match(value)
144
when :constraints
145
value.all? do |constraint_name, constraint_value|
146
if constraint_value.present?
spec/fixtures/dummy_test_groups.rb
@@ -7,4 +7,5 @@
7
config.groups["Some group"] = %r{^/somespace/}
8
config.groups["Foo"] = %r{^/reqs/}
9
config.groups["Subdomain"] = { constraints: { subdomain: 'subdomain' } }
10
+ config.groups["Controller"] = { controller: 'dummy', action: /\Aupdat/ }
11
end
0 commit comments