Sha256: d1ad316bd028033b35c866ad351e4238cb83b96e2c2f6c909276bc6ba6db769f

Contents?: true

Size: 619 Bytes

Versions: 3

Compression:

Stored size: 619 Bytes

Contents

require 'test_helper'

module DragonflySvg
  module Processors
    describe SetDimensions do

      let(:app) { test_app.configure_with(:svg) }
      let(:processor) { DragonflySvg::Processors::SetDimensions.new }
      let(:analyser) { DragonflySvg::Analysers::SvgProperties.new }
      let(:svg) { Dragonfly::Content.new(app, SAMPLES_DIR.join('sample.svg')) }

      before do
        processor.call(svg, 400, 600)
      end

      it 'sets width' do
        analyser.call(svg)[:width].must_equal 400
      end

      it 'sets height' do
        analyser.call(svg)[:height].must_equal 600
      end

    end
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
dragonfly_svg-0.0.3 test/dragonfly_svg/processors/set_dimensions_test.rb
dragonfly_svg-0.0.2 test/dragonfly_svg/processors/set_dimensions_test.rb
dragonfly_svg-0.0.1 test/dragonfly_svg/processors/set_dimensions_test.rb