Sha256: 8c3462ab249c5befa5e9dfc6fb2157cec7bfcc4773cad3dd6ff66080aee3f08f

Contents?: true

Size: 630 Bytes

Versions: 2

Compression:

Stored size: 630 Bytes

Contents

describe Metacrunch::File::Reader::TarFileReader do
  describe ".accepts?" do
    it "accepts filenames this reader can process" do
      expect(described_class.accepts?("foo.tar")).to equal(true)
      expect(described_class.accepts?("foo.tar.gz")).to equal(true)
      expect(described_class.accepts?("foo.tgz")).to equal(true)
    end

    it "does not accept filenames this reader cannot process" do
      expect(described_class.accepts?("plain_file")).to equal(false)
      expect(described_class.accepts?("plain_file.gz")).to equal(false)
      expect(described_class.accepts?("tatar.gz")).to equal(false)
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
metacrunch-2.2.1 spec/metacrunch/file/reader/tar_reader_spec.rb
metacrunch-2.2.0 spec/metacrunch/file/reader/tar_reader_spec.rb