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