gitlab-org--gitlab-foss/spec/support/track_untracked_uploads_helpers.rb

21 lines
521 B
Ruby
Raw Normal View History

2017-11-08 18:05:08 -05:00
module TrackUntrackedUploadsHelpers
2017-11-15 02:15:30 -05:00
def uploaded_file
fixture_path = Rails.root.join('spec', 'fixtures', 'rails_sample.jpg')
fixture_file_upload(fixture_path)
2017-11-08 18:05:08 -05:00
end
def recreate_temp_table_if_dropped
TrackUntrackedUploads.new.ensure_temporary_tracking_table_exists
end
RSpec.configure do |config|
config.after(:each, :temp_table_may_drop) do
recreate_temp_table_if_dropped
end
config.after(:context, :temp_table_may_drop) do
recreate_temp_table_if_dropped
end
end
2017-11-08 18:05:08 -05:00
end