Sha256: 533a3c9be5d367231b94120348a550ac98071b09c34c4830032b3c9dad0dca18
Contents?: true
Size: 748 Bytes
Versions: 18
Compression:
Stored size: 748 Bytes
Contents
require "spec_helper" describe Apipie::FileHandler do describe "match?" do let(:file_handler) { Apipie::FileHandler.new File.dirname(__FILE__) } it { expect(file_handler.match? 'file_handler_spec.rb').to be_truthy } it { expect(file_handler.match? 'foo.bar').to be_falsy } context 'path contains null bytes' do let(:path) { "foo%00.bar" } it { expect(file_handler.match? path).to be_falsy } it { expect { file_handler.match? path }.to_not raise_error } end context 'when the path contans an invalid byte sequence in UTF-8' do let(:path) { "%B6" } it { expect(file_handler.match? path).to be_falsy } it { expect { file_handler.match? path }.to_not raise_error } end end end
Version data entries
18 entries across 18 versions & 1 rubygems