Sha256: 725589c115cdd6c0b1a34d54e710b55e90ef00f015c50b7cc92106c3af417eac
Contents?: true
Size: 374 Bytes
Versions: 6
Compression:
Stored size: 374 Bytes
Contents
RSpec::Matchers.define :be_a_migration do match do |file_path| dirname, file_name = File.dirname(file_path), File.basename(file_path) if file_name.match(/\d+_.*\.rb/) migration_file_path = file_path else migration_file_path = Dir.glob("#{dirname}/[0-9]*_*.rb").grep(/\d+_#{file_name}$/).first end File.exist?(migration_file_path) end end
Version data entries
6 entries across 6 versions & 1 rubygems