Sha256: cdc2a3d4d9a74037fd79e93eb6f1723db94e01d9386fb7ae60792d7a7c1aa098
Contents?: true
Size: 804 Bytes
Versions: 2
Compression:
Stored size: 804 Bytes
Contents
require 'test_helper' describe DragonflySvg::Processors::ExtendIds do let(:app) { test_app.configure_with(:svg) } let(:content) { Dragonfly::Content.new(app, SAMPLES_DIR.join('sample.svg')) } let(:analyser) { DragonflySvg::Analysers::SvgProperties.new } let(:processor) { DragonflySvg::Processors::ExtendIds.new } before { @orig_id = analyser.call(content)['id'] } describe 'default' do before { processor.call(content) } it { analyser.call(content)['id'].wont_equal @orig_id } end describe 'supplied string' do before { processor.call(content, 'foo') } it { analyser.call(content)['id'].must_equal "#{@orig_id}-foo" } end describe 'tempfile has extension' do before { processor.call(content) } it { content.tempfile.path.must_match /\.svg\z/ } end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
dragonfly_svg-1.0.1 | test/dragonfly_svg/processors/extend_ids_test.rb |
dragonfly_svg-1.0.0 | test/dragonfly_svg/processors/extend_ids_test.rb |