@@ -16,58 +16,58 @@ def c.escaped_path(*parts)
16
16
controller_path_regex = c . escaped_path ( %w[ spec controllers ] )
17
17
c . include RSpec ::Rails ::ControllerExampleGroup ,
18
18
:type => :controller ,
19
- :example_group => lambda { |example_group , metadata = { } |
19
+ :example_group => lambda { |example_group , metadata |
20
20
metadata [ :type ] . nil? && controller_path_regex =~ example_group [ :file_path ]
21
21
}
22
22
23
23
helper_path_regex = c . escaped_path ( %w[ spec helpers ] )
24
24
c . include RSpec ::Rails ::HelperExampleGroup ,
25
25
:type => :helper ,
26
- :example_group => lambda { |example_group , metadata = { } |
26
+ :example_group => lambda { |example_group , metadata |
27
27
metadata [ :type ] . nil? && helper_path_regex =~ example_group [ :file_path ]
28
28
}
29
29
30
30
mailer_path_regex = c . escaped_path ( %w[ spec mailers ] )
31
31
if defined? ( RSpec ::Rails ::MailerExampleGroup )
32
32
c . include RSpec ::Rails ::MailerExampleGroup ,
33
33
:type => :mailer ,
34
- :example_group => lambda { |example_group , metadata = { } |
34
+ :example_group => lambda { |example_group , metadata |
35
35
metadata [ :type ] . nil? && mailer_path_regex =~ example_group [ :file_path ]
36
36
}
37
37
end
38
38
39
39
model_path_regex = c . escaped_path ( %w[ spec models ] )
40
40
c . include RSpec ::Rails ::ModelExampleGroup ,
41
41
:type => :model ,
42
- :example_group => lambda { |example_group , metadata = { } |
42
+ :example_group => lambda { |example_group , metadata |
43
43
metadata [ :type ] . nil? && model_path_regex =~ example_group [ :file_path ]
44
44
}
45
45
46
46
request_path_regex = c . escaped_path ( %w[ spec (requests|integration|api) ] )
47
47
c . include RSpec ::Rails ::RequestExampleGroup ,
48
48
:type => :request ,
49
- :example_group => lambda { |example_group , metadata = { } |
49
+ :example_group => lambda { |example_group , metadata |
50
50
metadata [ :type ] . nil? && request_path_regex =~ example_group [ :file_path ]
51
51
}
52
52
53
53
routing_path_regex = c . escaped_path ( %w[ spec routing ] )
54
54
c . include RSpec ::Rails ::RoutingExampleGroup ,
55
55
:type => :routing ,
56
- :example_group => lambda { |example_group , metadata = { } |
56
+ :example_group => lambda { |example_group , metadata |
57
57
metadata [ :type ] . nil? && routing_path_regex =~ example_group [ :file_path ]
58
58
}
59
59
60
60
view_path_regex = c . escaped_path ( %w[ spec views ] )
61
61
c . include RSpec ::Rails ::ViewExampleGroup ,
62
62
:type => :view ,
63
- :example_group => lambda { |example_group , metadata = { } |
63
+ :example_group => lambda { |example_group , metadata |
64
64
metadata [ :type ] . nil? && view_path_regex =~ example_group [ :file_path ]
65
65
}
66
66
67
67
feature_example_regex = c . escaped_path ( %w[ spec features ] )
68
68
c . include RSpec ::Rails ::FeatureExampleGroup ,
69
69
:type => :feature ,
70
- :example_group => lambda { |example_group , metadata = { } |
70
+ :example_group => lambda { |example_group , metadata |
71
71
metadata [ :type ] . nil? && feature_example_regex =~ example_group [ :file_path ]
72
72
}
73
73
end
0 commit comments