Sha256: 215832dc694f51ee046b6004c0cd6ea786513053a9559f771295696f72adf2a1

Contents?: true

Size: 457 Bytes

Versions: 23

Compression:

Stored size: 457 Bytes

Contents

require 'inline_svg/transform_pipeline'

describe InlineSvg::TransformPipeline::Transformations::Height do
  it "adds height attribute to a SVG document" do
    document = Nokogiri::XML::Document.parse('<svg>Some document</svg>')
    transformation = InlineSvg::TransformPipeline::Transformations::Height.create_with_value("5%")

    expect(transformation.transform(document).to_html).to eq(
      "<svg height=\"5%\">Some document</svg>\n"
    )
  end
end

Version data entries

23 entries across 23 versions & 1 rubygems

Version Path
inline_svg-1.2.1 spec/transformation_pipeline/transformations/height_spec.rb
inline_svg-1.2.0 spec/transformation_pipeline/transformations/height_spec.rb
inline_svg-1.1.0 spec/transformation_pipeline/transformations/height_spec.rb
inline_svg-1.0.1 spec/transformation_pipeline/transformations/height_spec.rb
inline_svg-1.0.0 spec/transformation_pipeline/transformations/height_spec.rb
inline_svg-0.12.1 spec/transformation_pipeline/transformations/height_spec.rb
inline_svg-0.12.0 spec/transformation_pipeline/transformations/height_spec.rb
inline_svg-0.11.1 spec/transformation_pipeline/transformations/height_spec.rb
inline_svg-0.11.0 spec/transformation_pipeline/transformations/height_spec.rb
inline_svg-0.10.0 spec/transformation_pipeline/transformations/height_spec.rb
inline_svg-0.9.1 spec/transformation_pipeline/transformations/height_spec.rb
inline_svg-0.9.0 spec/transformation_pipeline/transformations/height_spec.rb
inline_svg-0.8.0 spec/transformation_pipeline/transformations/height_spec.rb
inline_svg-0.7.0 spec/transformation_pipeline/transformations/height_spec.rb
inline_svg-0.6.4 spec/transformation_pipeline/transformations/height_spec.rb
inline_svg-0.6.3 spec/transformation_pipeline/transformations/height_spec.rb
inline_svg-0.6.2 spec/transformation_pipeline/transformations/height_spec.rb
inline_svg-0.6.1 spec/transformation_pipeline/transformations/height_spec.rb
inline_svg-0.6.0 spec/transformation_pipeline/transformations/height_spec.rb
inline_svg-0.5.3 spec/transformation_pipeline/transformations/height_spec.rb