mirror of
https://github.com/manyfold3d/manyfold.git
synced 2026-10-22 19:52:18 -05:00
29 lines
630 B
Ruby
29 lines
630 B
Ruby
require "rails_helper"
|
|
|
|
RSpec.describe SiteSettings do
|
|
context "when detecting ignored files" do
|
|
%w[
|
|
./test.stl
|
|
/test.stl
|
|
test.stl
|
|
test/test.stl
|
|
].each do |pathname|
|
|
it "accepts `#{pathname}`" do
|
|
expect(described_class.send(:ignored_file?, pathname)).to be false
|
|
end
|
|
end
|
|
|
|
%w[
|
|
.test.stl
|
|
test/.test.stl
|
|
.test/test.stl
|
|
model/@eaDir/test.png/SYNOPHOTO_THUMB_S.png
|
|
model/__MACOSX
|
|
].each do |pathname|
|
|
it "ignores `#{pathname}`" do
|
|
expect(described_class.send(:ignored_file?, pathname)).to be true
|
|
end
|
|
end
|
|
end
|
|
end
|