Sha256: 3608b9238d8b7788a83a395d177b98c0a6e555896125384c89b24168d63a692d

Contents?: true

Size: 722 Bytes

Versions: 18

Compression:

Stored size: 722 Bytes

Contents

require File.expand_path('../helpers', File.dirname(__FILE__))

module PrmdLoaderTests
  # @abstrac
  def testing_filename
    #
  end

  # @abstract
  def loader_module
    #
  end

  def assert_test_data(data)
    assert_kind_of Hash, data
    assert_equal 'yes', data['test']
    assert_kind_of Hash, data['object']
    assert_equal 'Object', data['object']['is_a']
  end

  def test_load_data
    data = File.read(testing_filename)
    assert_test_data loader_module.load_data(data)
  end

  def test_load_stream
    File.open(testing_filename, 'r') do |f|
      assert_test_data loader_module.load_stream(f)
    end
  end

  def test_load_file
    assert_test_data loader_module.load_file(testing_filename)
  end
end

Version data entries

18 entries across 18 versions & 1 rubygems

Version Path
prmd-0.11.10 test/multi_loader/common.rb
prmd-0.11.9 test/multi_loader/common.rb
prmd-0.11.8 test/multi_loader/common.rb
prmd-0.11.7 test/multi_loader/common.rb
prmd-0.11.6 test/multi_loader/common.rb
prmd-0.11.5 test/multi_loader/common.rb
prmd-0.11.4 test/multi_loader/common.rb
prmd-0.11.3 test/multi_loader/common.rb
prmd-0.11.2 test/multi_loader/common.rb
prmd-0.11.1 test/multi_loader/common.rb
prmd-0.11.0 test/multi_loader/common.rb
prmd-0.10.0 test/multi_loader/common.rb
prmd-0.9.0 test/multi_loader/common.rb
prmd-0.8.0 test/multi_loader/common.rb
prmd-0.7.4 test/multi_loader/common.rb
prmd-0.7.3 test/multi_loader/common.rb
prmd-0.7.2 test/multi_loader/common.rb
prmd-0.7.1 test/multi_loader/common.rb