Sha256: 3c458c3d72d3d311325143289d165bd0c9262825bf5aa598274495f17d154236
Contents?: true
Size: 696 Bytes
Versions: 2
Compression:
Stored size: 696 Bytes
Contents
require 'test_helper' describe DragonflySvg::Processors::SetTagValue do let(:app) { test_app.configure_with(:svg) } let(:processor) { DragonflySvg::Processors::SetTagValue.new } let(:analyser) { DragonflySvg::Analysers::SvgProperties.new } let(:content) { Dragonfly::Content.new(app, SAMPLES_DIR.join('sample.svg')) } let(:xpath) { "//*[name()='text']" } let(:val) { 'TEST' } before { processor.call(content, xpath, val) } it { Nokogiri::XML(content.data).xpath(xpath).count.must_equal 1 } it { Nokogiri::XML(content.data).xpath(xpath).first.inner_html.must_equal val } describe 'tempfile has extension' do 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/set_tag_value_test.rb |
dragonfly_svg-1.0.0 | test/dragonfly_svg/processors/set_tag_value_test.rb |