Sha256: 15cecff63a4e19fdd061a73feb1213097e9f834959a5de09dc626bc7bd006861

Contents?: true

Size: 1.38 KB

Versions: 49

Compression:

Stored size: 1.38 KB

Contents

# ********** Copyright Viacom, Inc. Apache 2.0 **********

require_relative "test_helper.rb"

module RokuBuilder
  class PluginTest < Minitest::Test
    def setup
      Logger.set_testing
    end
    def test_module_commands_fail
      assert_raises ImplementationError do
        TestClass.commands
      end
    end
    def test_module_commands_success
      TestClass2.commands
    end
    def test_module_parse_options_fail
      assert_raises ImplementationError do
        TestClass.parse_options(option_parser: nil, options: nil)
      end
    end
    def test_module_parse_options_success
      TestClass2.parse_options(option_parser: nil, options: nil)
    end
    def test_module_dependencies
      assert_equal Array, TestClass.dependencies.class
    end
    def test_module_dependencies_dependent
      assert_equal Array, TestClass2.dependencies.class
      assert_equal TestClass, TestClass2.dependencies[0]
    end
    def test_module_validate_none
      TestClass.validate
    end
    def test_module_validate_failure
      assert_raises InvalidConfig do
        TestClass2.validate
      end
    end
  end
  class TestClass
    extend Plugin
  end
  class TestClass2
    extend Plugin
    def self.commands
    end
    def self.parse_options(option_parser:, options:)
    end
    def self.dependencies
      [TestClass]
    end
    def self.validate
      raise InvalidConfig
    end
  end
end

Version data entries

49 entries across 49 versions & 1 rubygems

Version Path
roku_builder-4.30.0 test/roku_builder/test_plugin.rb
roku_builder-4.29.9 test/roku_builder/test_plugin.rb
roku_builder-4.29.8 test/roku_builder/test_plugin.rb
roku_builder-4.29.7 test/roku_builder/test_plugin.rb
roku_builder-4.29.6 test/roku_builder/test_plugin.rb
roku_builder-4.29.4 test/roku_builder/test_plugin.rb
roku_builder-4.29.2 test/roku_builder/test_plugin.rb
roku_builder-4.29.1 test/roku_builder/test_plugin.rb
roku_builder-4.28.0 test/roku_builder/test_plugin.rb
roku_builder-4.27.2 test/roku_builder/test_plugin.rb
roku_builder-4.27.1 test/roku_builder/test_plugin.rb
roku_builder-4.27.0 test/roku_builder/test_plugin.rb
roku_builder-4.26.2 test/roku_builder/test_plugin.rb
roku_builder-4.26.1 test/roku_builder/test_plugin.rb
roku_builder-4.26.0 test/roku_builder/test_plugin.rb
roku_builder-4.25.6 test/roku_builder/test_plugin.rb
roku_builder-4.25.5 test/roku_builder/test_plugin.rb
roku_builder-4.25.4 test/roku_builder/test_plugin.rb
roku_builder-4.25.3 test/roku_builder/test_plugin.rb
roku_builder-4.25.1 test/roku_builder/test_plugin.rb