Sha256: 35b2cd28dd3baa5cf9c3437159c19770faed8d1cecdac9c410e069577facadea

Contents?: true

Size: 692 Bytes

Versions: 3

Compression:

Stored size: 692 Bytes

Contents

class TestInspect < ConfigurationsTest
  setup_with {}

  def inspect_output(_configuration)
    "#<#{self.class.name}::TestModule::Configuration:0x00%x @data={}>" % [@configuration.object_id << 1]
  end

  def test_non_debug_inspect
    expected = inspect_output(@configuration)

    assert @configuration.inspect == expected, "Expected inspect to produce output #{expected.inspect}, but got #{@configuration.inspect.inspect}"
  end

  def test_debug_inspect
    non_debug = inspect_output(@configuration)

    refute @configuration.inspect(true) == non_debug, "Expected debug inspect to delegate to kernel and produce more output, but got #{@configuration.inspect(true).inspect}"
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
configurations-2.2.2 test/configurations/configuration/test_inspect.rb
configurations-2.2.1 test/configurations/configuration/test_inspect.rb
configurations-2.2.0 test/configurations/configuration/test_inspect.rb