Sha256: a8c1f6a18a1513b6bc4163b1731481a929e2820a8daa00d68768d1395afc03da

Contents?: true

Size: 802 Bytes

Versions: 3

Compression:

Stored size: 802 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: data_file('layout_text1')
    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

3 entries across 3 versions & 1 rubygems

Version Path
thinreports-0.8.2 test/unit/core/shape/basic/test_basic_interface.rb
thinreports-0.8.1 test/unit/core/shape/basic/test_basic_interface.rb
thinreports-0.8.0 test/unit/core/shape/basic/test_basic_interface.rb