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.
rails_helper
1 parent 6f436bf commit e80f643Copy full SHA for e80f643
test/generators/suspenders/factories_generator_test.rb
@@ -175,6 +175,20 @@ class FactoriesGenerator::RSpecTest < Rails::Generators::TestCase
175
end
176
177
178
+ test "does not modify rails_helper if it's configured to include support files" do
179
+ touch("spec/rails_helper.rb")
180
+ rails_helper = <<~RUBY
181
+ Dir[Rails.root.join("spec/support/**/*.rb")].sort.each { |file| require file }
182
+ RUBY
183
+ File.open(app_root("spec/rails_helper.rb"), "w") { _1.write rails_helper }
184
+
185
+ run_generator
186
187
+ assert_file app_root("spec/rails_helper.rb") do |file|
188
+ assert_equal rails_helper, file
189
+ end
190
191
192
test "creates linting test" do
193
factories_spec = <<~RUBY
194
require "rails_helper"
0 commit comments