Sha256: 92bdefb1e4d0a48e4c9ea5be9ceda578dbe5552a99608425a7e5e33e450ef46b

Contents?: true

Size: 642 Bytes

Versions: 4

Compression:

Stored size: 642 Bytes

Contents

require "spec_helper"

require_relative "../../lib/vectory/file_magic"

RSpec.describe Vectory::FileMagic do
  describe "#detect" do
    references = {
      "spec/examples/eps2svg/img.eps" => :eps,
      "spec/examples/eps2emf/img.eps" => :eps,
      "spec/examples/eps2svg/ref.svg" => :svg,
      "spec/examples/svg2emf/img.svg" => :svg,
      "spec/examples/eps2emf/ref.emf" => :emf,
      "spec/examples/svg2emf/ref.emf" => :emf,
    }

    references.each do |file, format|
      context file do
        it "returns #{format} format" do
          expect(described_class.detect(file)).to eq format
        end
      end
    end
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
vectory-0.4.2 spec/vectory/file_magic_spec.rb
vectory-0.4.1 spec/vectory/file_magic_spec.rb
vectory-0.4.0 spec/vectory/file_magic_spec.rb
vectory-0.3.0 spec/vectory/file_magic_spec.rb