Sha256: 37e568ce221b5d6f5024ed407206162a614f6fc7b5ca884ac304434a47c3a6b1

Contents?: true

Size: 669 Bytes

Versions: 8

Compression:

Stored size: 669 Bytes

Contents

require 'spec_helper'

describe FormatParser::PSDParser do
  describe 'is able to parse all the examples from FastImage' do
    Dir.glob(fixtures_dir + '/*.psd').each do |psd_path|
      it "is able to parse #{File.basename(psd_path)}" do
        parsed = subject.information_from_io(File.open(psd_path, 'rb'))

        expect(parsed).not_to be_nil
        expect(parsed.file_nature).to eq(:image)
        expect(parsed.file_type).to eq(:psd)

        expect(parsed.width_px).to be_kind_of(Integer)
        expect(parsed.width_px).to be > 0

        expect(parsed.height_px).to be_kind_of(Integer)
        expect(parsed.height_px).to be > 0
      end
    end
  end
end

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
format_parser-0.1.7 spec/parsers/psd_parser_spec.rb
format_parser-0.1.6 spec/parsers/psd_parser_spec.rb
format_parser-0.1.5 spec/parsers/psd_parser_spec.rb
format_parser-0.1.4 spec/parsers/psd_parser_spec.rb
format_parser-0.1.3 spec/parsers/psd_parser_spec.rb
format_parser-0.1.2 spec/parsers/psd_parser_spec.rb
format_parser-0.1.1 spec/parsers/psd_parser_spec.rb
format_parser-0.1.0 spec/parsers/psd_parser_spec.rb