Sha256: 692acc08a22b82b347ec036351522e1ba9fb4cb71cc7fb5cff14c7231ce0f591
Contents?: true
Size: 1.02 KB
Versions: 1
Compression:
Stored size: 1.02 KB
Contents
# coding: utf-8 require 'test/unit/helper' class ThinReports::Core::Shape::Basic::TestInternal < MiniTest::Unit::TestCase include ThinReports::TestHelpers Basic = ThinReports::Core::Shape::Basic def setup format = flexmock('format') format.should_receive(:display? => true) @internal = Basic::Internal.new(flexmock('parent'), format) end def test_visible assert_equal @internal.visible?, true @internal.visible(false) assert_equal @internal.visible?, false assert_equal @internal.format.display?, true end def test_svg_attr assert_empty @internal.attrs @internal.svg_attr(:fill, 'red') @internal.svg_attr(:stroke, 'black') assert_equal @internal.attrs, {'fill' => 'red', 'stroke' => 'black'} end def test_type_of? flexmock(@internal.format).should_receive(:type => 's-rect') assert_equal @internal.type_of?(:basic), true assert_equal @internal.type_of?(:rect), true assert_equal @internal.type_of?(:tblock), false end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
thinreports-0.6.0.pre3 | test/unit/core/shape/basic/test_internal.rb |