Sha256: 3e722a47b57c22138fb3fb7241fb8accb37773903df5f4e81e829ef939e15d59

Contents?: true

Size: 833 Bytes

Versions: 28

Compression:

Stored size: 833 Bytes

Contents

require_relative 'test_helper'
module MeducationSDK
  class HelperTestClass
    include Helpers
  end

  class HelpersTest < Minitest::Test
    {
      "Item::Comment" => "MeducationSDK::Comment",
      "KnowledgeBank::Question" => "MeducationSDK::KnowledgeBankQuestion"
    }.each do |spi_type, sdk_type|
      define_method "test_sdk_type_for_#{spi_type.underscore.gsub("/", "_")}" do
        assert_equal sdk_type, HelperTestClass.new.sdk_type_for(spi_type)
      end
      define_method "test_sdk_class_for_#{spi_type.underscore.gsub("/", "_")}" do
        assert_equal sdk_type.constantize, HelperTestClass.new.sdk_class_for(spi_type)
      end
      define_method "test_spi_type_for_#{spi_type.underscore.gsub("/", "_")}" do
        assert_equal spi_type, HelperTestClass.new.spi_type_for(sdk_type)
      end
    end
  end
end

Version data entries

28 entries across 28 versions & 1 rubygems

Version Path
meducation_sdk-2.2.2 test/helpers_test.rb
meducation_sdk-2.2.1 test/helpers_test.rb
meducation_sdk-2.2.0 test/helpers_test.rb
meducation_sdk-2.1.4 test/helpers_test.rb
meducation_sdk-2.1.3 test/helpers_test.rb
meducation_sdk-2.1.2 test/helpers_test.rb
meducation_sdk-2.1.1 test/helpers_test.rb
meducation_sdk-2.1.0 test/helpers_test.rb
meducation_sdk-2.0.5 test/helpers_test.rb
meducation_sdk-2.0.4 test/helpers_test.rb
meducation_sdk-2.0.3 test/helpers_test.rb
meducation_sdk-2.0.2 test/helpers_test.rb
meducation_sdk-2.0.1 test/helpers_test.rb
meducation_sdk-2.0.0 test/helpers_test.rb
meducation_sdk-1.6.16 test/helpers_test.rb
meducation_sdk-1.6.15 test/helpers_test.rb
meducation_sdk-1.6.14 test/helpers_test.rb
meducation_sdk-1.6.13 test/helpers_test.rb
meducation_sdk-1.6.12 test/helpers_test.rb
meducation_sdk-1.6.11 test/helpers_test.rb