mirror of
https://0xacab.org/sutty/sutty
synced 2024-11-28 15:06:22 +00:00
19 lines
401 B
Ruby
19 lines
401 B
Ruby
# frozen_string_literal: true
|
|
|
|
module MetadataTest
|
|
extend ActiveSupport::Concern
|
|
|
|
included do
|
|
setup do
|
|
name = SecureRandom.hex
|
|
# TODO: Poder cambiar el nombre
|
|
FileUtils.cp_r(Rails.root.join('test', 'fixtures', 'site_with_relationships'), Rails.root.join('_sites', name))
|
|
|
|
@site = create :site, name: name
|
|
end
|
|
|
|
teardown do
|
|
@site&.destroy
|
|
end
|
|
end
|
|
end
|