Sha256: 6bf02e515c3493d6652abb54050777d42671b32a5446f30dafded9289db8279e

Contents?: true

Size: 611 Bytes

Versions: 26

Compression:

Stored size: 611 Bytes

Contents

require 'spec_helper'

describe PSD::LazyExecute do
  before(:each) do
    @psd = PSD.new('spec/files/pixel.psd')
  end

  it 'initializes correctly' do
    expect(@psd.image).to be_an_instance_of(PSD::LazyExecute)
    expect(@psd.image).to_not be_loaded
    expect(@psd.image.instance_variable_get(:@obj)).to be_an_instance_of(PSD::Image)
    expect(@psd.image.instance_variable_get(:@start_pos)).to eq @psd.file.tell
    expect(@psd.image.instance_variable_get(:@load_method)).to eq :parse
  end

  it 'loads when accessed the first time' do
    @psd.image.to_png
    expect(@psd.image).to be_loaded
  end
end

Version data entries

26 entries across 26 versions & 2 rubygems

Version Path
psd-3.9.0 spec/lazy_execute_spec.rb
psd-3.8.0 spec/lazy_execute_spec.rb
psd-3.7.0 spec/lazy_execute_spec.rb
psd-3.6.0 spec/lazy_execute_spec.rb
bench9000-0.1 vendor/psd.rb/spec/lazy_execute_spec.rb
psd-3.5.0 spec/lazy_execute_spec.rb
psd-3.4.0 spec/lazy_execute_spec.rb
psd-3.3.3 spec/lazy_execute_spec.rb
psd-3.3.2 spec/lazy_execute_spec.rb
psd-3.3.1 spec/lazy_execute_spec.rb
psd-3.2.4 spec/lazy_execute_spec.rb
psd-3.2.3 spec/lazy_execute_spec.rb
psd-3.2.2 spec/lazy_execute_spec.rb
psd-3.2.1 spec/lazy_execute_spec.rb
psd-3.2.0 spec/lazy_execute_spec.rb
psd-3.1.5 spec/lazy_execute_spec.rb
psd-3.1.4 spec/lazy_execute_spec.rb
psd-3.1.3 spec/lazy_execute_spec.rb
psd-3.1.2 spec/lazy_execute_spec.rb
psd-2.1.2 spec/lazy_execute_spec.rb