Sha256: c4e5922fd04388e3f9406247e232c037be5f2802d1fae29f189c0927bee6f001
Contents?: true
Size: 1.12 KB
Versions: 1
Compression:
Stored size: 1.12 KB
Contents
# coding: utf-8 require 'test/unit/helper' class ThinReports::Core::TestShape < MiniTest::Unit::TestCase include ThinReports::TestHelpers # Alias ShapeModule = ThinReports::Core::Shape def test_find_by_type assert_same ShapeModule.find_by_type('s-tblock'), ShapeModule::Tblock assert_same ShapeModule.find_by_type('s-list'), ShapeModule::List assert_same ShapeModule.find_by_type('s-text'), ShapeModule::Text assert_same ShapeModule.find_by_type('s-image'), ShapeModule::Basic assert_same ShapeModule.find_by_type('s-line'), ShapeModule::Basic assert_same ShapeModule.find_by_type('s-rect'), ShapeModule::Basic assert_same ShapeModule.find_by_type('s-ellipse'), ShapeModule::Basic assert_raises ThinReports::Errors::UnknownShapeType do ShapeModule.find_by_type('unknown') end end def test_Configuration assert_same ShapeModule::Configuration('s-list'), ShapeModule::List::Configuration # When shape don't have a Configuration assert_raises ThinReports::Errors::NoConfigurationFound do ShapeModule::Configuration('s-line') end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
thinreports-0.6.0.pre3 | test/unit/core/test_shape.rb |