Sha256: ed9a58f6e0c5e7b38eedaa6215514bec6c6f70fb5a95eb20246affe594b8524a

Contents?: true

Size: 793 Bytes

Versions: 2

Compression:

Stored size: 793 Bytes

Contents

# coding: utf-8

require 'test_helper'

class Thinreports::Core::Shape::Basic::TestBlockInterface < Minitest::Test
  include Thinreports::TestHelper

  Basic = Thinreports::Core::Shape::Basic

  def setup
    report = Thinreports::Report.new layout: layout_file.path
    parent = report.start_new_page

    format = Basic::BlockFormat.new({})
    internal = Basic::BlockInternal.new parent, format

    @interface = Basic::BlockInterface.new parent, format, internal
  end

  def test_value_should_work_as_reader_with_no_arguments
    @interface.internal.write_value('new value')
    assert_equal @interface.value, 'new value'
  end

  def test_value_should_work_as_writer_with_arguments
    @interface.value('new value')
    assert_equal @interface.internal.read_value, 'new value'
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
thinreports-0.9.1 test/unit/core/shape/basic/test_block_interface.rb
thinreports-0.9.0 test/unit/core/shape/basic/test_block_interface.rb