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 a785198 commit a3bebfdCopy full SHA for a3bebfd
spec/spec_helper.rb
@@ -74,4 +74,14 @@ def self.run_all(reporter = nil)
74
example.run
75
end
76
77
+
78
+ # Work around ammeter's incompatibility with RSpec 4
79
+ # TODO: Remove once https://github.com/alexrothenberg/ammeter/pull/64 is merged
80
+ generator_path_regex = Regexp.compile(%w[spec generators].join('[\\\/]') + '[\\\/]')
81
+ config.include Ammeter::RSpec::Rails::GeneratorExampleGroup,
82
+ type: :generator
83
84
+ file_path: lambda { |file_path, metadata|
85
+ metadata[:type].nil? && generator_path_regex =~ file_path
86
+ }
87
0 commit comments