class Object
Constants
- ConfigError
- DEFAULT_EXTENSIONS
- DEFAULT_TRANSPORTS
Public Class Methods
common(context)
click to toggle source
# File test/loaders/test_base.rb, line 120 def self.common(context) context.it "stores the links between opaques and intermediates in the metadata" do loader.register_typekit_model(typekit) assert_equal ['/intermediate'], loader.resolve_type('/test'). metadata.get('orogen:intermediate_type') assert_equal ['/test'], loader.resolve_type('/intermediate'). metadata.get('orogen:intermediate_type_of') end end
Public Instance Methods
conn_policy()
click to toggle source
# File test/spec/test_deployment.rb, line 97 def conn_policy; OroGen::Spec::ConnPolicy end
load(file)
click to toggle source
# File test/loaders/test_project.rb, line 12 def load(file) OroGen::Loaders::Project.new(target).__load__(file) end
stub_orogen_pkgconfig(name, task_models = Array.new, deployed_tasks = Array.new)
click to toggle source
# File test/loaders/test_pkg_config.rb, line 31 def stub_orogen_pkgconfig(name, task_models = Array.new, deployed_tasks = Array.new) deffile = File.join(fixtures_prefix, 'deffile', "base.orogen") type_registry = File.join(fixtures_prefix, "typekit", "#{name}.tlb") type_registry = nil if !File.exists?(type_registry) pkg = flexmock( :project_name => name, :deffile => deffile, :type_registry => type_registry, :task_models => task_models.join(","), :deployed_tasks_with_models => deployed_tasks.join(","), :binfile => "/path/to/binfile/#{name}") stub_pkgconfig_package("orogen-project-#{name}", pkg) stub_pkgconfig_package("#{name}-typekit-oroarch", pkg) stub_pkgconfig_package("#{name}-tasks-oroarch", pkg) stub_pkgconfig_package("orogen-#{name}", pkg) return pkg end
stub_orogen_pkgconfig_final()
click to toggle source
# File test/loaders/test_pkg_config.rb, line 23 def stub_orogen_pkgconfig_final stub_pkgconfig_each_package /^orogen-project-/ stub_pkgconfig_each_package /-tasks-oroarch$/ stub_pkgconfig_each_package /^orogen-\w+$/ stub_pkgconfig_each_package /-typekit-oroarch$/ flexmock(Utilrb::PkgConfig).should_receive(:get).with(String, Hash).and_return { raise Utilrb::PkgConfig::NotFound.new("not found") } end
stub_pkgconfig_each_package(filter)
click to toggle source
# File test/loaders/test_pkg_config.rb, line 14 def stub_pkgconfig_each_package(filter) @pkg_config ||= Hash.new mock = flexmock(Utilrb::PkgConfig).should_receive(:each_package).with(filter, Proc) packages = pkg_config.find_all { |name, pkg| filter === name } if !packages.empty? mock.and_iterates(*packages.map(&:first)) end end
stub_pkgconfig_package(pkg_name, pkg)
click to toggle source
# File test/loaders/test_pkg_config.rb, line 7 def stub_pkgconfig_package(pkg_name, pkg) @pkg_config ||= Hash.new pkg_config[pkg_name] = pkg flexmock(Utilrb::PkgConfig).should_receive(:get). with(pkg_name, Hash).and_return(pkg) end