Sha256: 2caa7e721060787f82e9e2173726116b3150bf8edd3d0184fefd4cdd7125ed3b

Contents?: true

Size: 771 Bytes

Versions: 27

Compression:

Stored size: 771 Bytes

Contents

require 'spec_helper'

describe 'PSD' do
  let(:filename) { 'spec/files/example.psd' }

	it 'should open a file without a block' do
    psd = PSD.open(filename)
    expect(psd).to be_parsed
    expect(psd).to be_an_instance_of(PSD)
	end

  it 'should refuse to open a bad filename' do
    expect { PSD.open('') }.to raise_error
  end

  it 'should open a file and feed it to a block' do
    PSD.open(filename) do |psd|
      expect(psd).to be_parsed
      expect(psd).to be_an_instance_of(PSD)
    end
  end

  # We have to use #should syntax here because the DSL binds
  # the block to the PSD instance.
  it 'should open a file and feed it to a block DSL style' do
    PSD.open(filename) do
      parsed?.should == true
      is_a?(PSD).should == true
    end
  end
end

Version data entries

27 entries across 27 versions & 2 rubygems

Version Path
psd_native-1.1.0 spec/psd_spec.rb
psd_native-1.0.1 spec/psd_spec.rb
psd-2.1.0 spec/psd_spec.rb
psd_native-1.0.0 spec/psd_spec.rb
psd-2.0.0 spec/psd_spec.rb
psd-1.5.0 spec/psd_spec.rb
psd-1.4.5 spec/psd_spec.rb
psd-1.4.4 spec/psd_spec.rb
psd_native-0.6.0 spec/psd_spec.rb
psd-1.4.3 spec/psd_spec.rb
psd-1.4.2 spec/psd_spec.rb
psd_native-0.5.0 spec/psd_spec.rb
psd-1.4.1 spec/psd_spec.rb
psd_native-0.4.0 spec/psd_spec.rb
psd-1.4.0 spec/psd_spec.rb
psd-1.3.3 spec/psd_spec.rb
psd-1.3.2 spec/psd_spec.rb
psd_native-0.3.1 spec/psd_spec.rb
psd-1.3.0 spec/psd_spec.rb
psd_native-0.3.0 spec/psd_spec.rb