Sha256: 6479f78e69d0d31c1a075c81688c1c833ecdca76a326d326549cd625b4498242

Contents?: true

Size: 646 Bytes

Versions: 58

Compression:

Stored size: 646 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.call(File.open(psd_path, 'rb'))

        expect(parsed).not_to be_nil
        expect(parsed.nature).to eq(:image)
        expect(parsed.format).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

58 entries across 58 versions & 1 rubygems

Version Path
format_parser-0.26.0 spec/parsers/psd_parser_spec.rb
format_parser-0.25.6 spec/parsers/psd_parser_spec.rb
format_parser-0.25.5 spec/parsers/psd_parser_spec.rb
format_parser-0.25.4 spec/parsers/psd_parser_spec.rb
format_parser-0.25.3 spec/parsers/psd_parser_spec.rb
format_parser-0.25.2 spec/parsers/psd_parser_spec.rb
format_parser-0.25.1 spec/parsers/psd_parser_spec.rb
format_parser-0.25.0 spec/parsers/psd_parser_spec.rb
format_parser-0.24.2 spec/parsers/psd_parser_spec.rb
format_parser-0.24.1 spec/parsers/psd_parser_spec.rb
format_parser-0.24.0 spec/parsers/psd_parser_spec.rb
format_parser-0.23.1 spec/parsers/psd_parser_spec.rb
format_parser-0.23.0 spec/parsers/psd_parser_spec.rb
format_parser-0.22.1 spec/parsers/psd_parser_spec.rb
format_parser-0.22.0 spec/parsers/psd_parser_spec.rb
format_parser-0.21.1 spec/parsers/psd_parser_spec.rb
format_parser-0.21.0 spec/parsers/psd_parser_spec.rb
format_parser-0.20.1 spec/parsers/psd_parser_spec.rb
format_parser-0.20.0 spec/parsers/psd_parser_spec.rb
format_parser-0.19.0 spec/parsers/psd_parser_spec.rb