Sha256: 932534da8d1e156a91a0d198288f7a6fa593441caaaee1434d069da5ed4b1db8

Contents?: true

Size: 546 Bytes

Versions: 10

Compression:

Stored size: 546 Bytes

Contents

require 'spec_helper'
require 'tempfile'

def test_svg(type)
  file = Tempfile.new('svg')
  file.write(GithubChart.new(user: 'akerl').render(type))
  path = file.path
  file.close
  res = `file #{path}`
  file.unlink
  res
end

describe GithubChart::Chart do
  describe '#render_svg' do
    it 'makes an SVG' do
      expect(test_svg(:svg)).to include('Scalable Vector Graphic')
    end
  end

  describe '#render_svg_square' do
    it 'makes an SVG' do
      expect(test_svg(:svg_square)).to include('Scalable Vector Graphic')
    end
  end
end

Version data entries

10 entries across 10 versions & 1 rubygems

Version Path
githubchart-4.0.0 spec/githubchart/svg_spec.rb
githubchart-3.4.0 spec/githubchart/svg_spec.rb
githubchart-3.3.1 spec/githubchart/svg_spec.rb
githubchart-3.3.0 spec/githubchart/svg_spec.rb
githubchart-3.2.0 spec/githubchart/svg_spec.rb
githubchart-3.1.1 spec/githubchart/svg_spec.rb
githubchart-3.1.0 spec/githubchart/svg_spec.rb
githubchart-2.1.0 spec/githubchart/svg_spec.rb
githubchart-2.0.1 spec/githubchart/svg_spec.rb
githubchart-2.0.0 spec/githubchart/svg_spec.rb