Commit d8173b0c authored by Krasimir Angelov's avatar Krasimir Angelov

Improve require_migration test helper

to exclude files like Vim `swp` files.
parent e378ebea
......@@ -29,7 +29,7 @@ class RequireMigration
migration_folders.flat_map do |path|
migration_path = Rails.root.join(path).to_s
Find.find(migration_path).grep(/\d+_#{file_name}\.rb/)
Find.find(migration_path).select { |m| File.basename(m).match? /\A\d+_#{file_name}\.rb\z/ }
end
end
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment