Class: Syskit::Test::ProfileTest
- Extended by:
- MetaRuby::DSLs::FindThroughMethodMissing
- Includes:
- MetaRuby::DSLs::FindThroughMethodMissing, Syskit::Test, ProfileAssertions
- Defined in:
- lib/syskit/test/profile_test.rb
Overview
Base class for testing Actions::Profile
Class Method Summary collapse
- .define_deprecated_test_form(name) ⇒ Object
- .find_definition(name) ⇒ Object
- .find_device(name) ⇒ Object
- .find_through_method_missing(m, args) ⇒ Object
- .has_through_method_missing?(m) ⇒ Boolean
-
.it_should_be_self_contained(*definitions) ⇒ Object
deprecated
Deprecated.
replace by it { is_self_contained } it { is_self_contained(a_def, another_def) }
- .subject_syskit_model ⇒ Object
Instance Method Summary collapse
Methods included from ProfileAssertions
#Actions, #AtomicActions, #BulkAssertAtomicActions, #assert_can_configure_together, #assert_can_deploy, #assert_can_deploy_together, #assert_can_instanciate, #assert_can_instanciate_together, #assert_is_self_contained, #can_configure_together, #can_deploy, #can_deploy_together, #can_instanciate, #can_instanciate_together, #expand_coordination_models, #is_self_contained
Methods included from NetworkManipulation
#__syskit_root_components, #normalize_instanciation_models, #resolve_orocos_writer, #setup, #syskit_configure, #syskit_configure_and_start, #syskit_default_stub_name, #syskit_deploy, #syskit_deploy_and_configure, #syskit_deploy_configure_and_start, #syskit_engine_resolve_handle_plan_export, #syskit_export_to_svg, #syskit_generate_network, #syskit_guard_against_configure, #syskit_guard_against_start_and_configure, #syskit_prepare_configure, #syskit_prepare_start, #syskit_protect_configuration_manager, #syskit_start, #syskit_start_all_execution_agents, #syskit_start_execution_agents, #syskit_stub, #syskit_stub_and_deploy, #syskit_stub_attached_device, #syskit_stub_com_bus, #syskit_stub_component, #syskit_stub_composition_requirements, #syskit_stub_conf, #syskit_stub_configured_deployment, #syskit_stub_deploy_and_configure, #syskit_stub_deploy_configure_and_start, #syskit_stub_deployment, #syskit_stub_deployment_model, #syskit_stub_device, #syskit_stub_driver_model_for, #syskit_stub_model_id, #syskit_stub_network, #syskit_stub_network_abstract_component, #syskit_stub_network_deployment, #syskit_stub_placeholder, #syskit_stub_required_devices, #syskit_stub_requirements, #syskit_stub_resolves_remote_tasks=, #syskit_stub_resolves_remote_tasks?, #syskit_stub_task_context_model, #syskit_stub_task_context_requirements, #syskit_wait_ready, #syskit_write, #teardown, #use_deployment, #use_ruby_tasks, #use_unmanaged_task
Methods included from FlexMockExtension
Methods included from ExecutionExpectations
#have_no_new_sample, #have_one_new_sample, resolve_orocos_reader
Methods inherited from Spec
#plan, #setup, #subject_syskit_model, #syskit_stub_attached_device_model, #syskit_stub_driver_model, #teardown, #teardown_registered_plans, use_syskit_model
Methods included from Base
#assert_has_no_new_sample, #assert_has_one_new_sample, #plug_connection_management, #plug_requirement_modifications, #setup, #stub_type, #teardown, #unplug_connection_management, #unplug_requirement_modifications
Class Method Details
.define_deprecated_test_form(name) ⇒ Object
19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 |
# File 'lib/syskit/test/profile_test.rb', line 19 def self.define_deprecated_test_form(name) define_method("it_#{name}") do |*args, **| Syskit::Test.warn "class-level it_#{name} is deprecated, replace by" Syskit::Test.warn "it { #{name}(a_def, another_def) }" it { send(name, *args, **) } end define_method("it_#{name}_all") do |**| Syskit::Test.warn "class-level it_#{name}_all is deprecated, replace by" Syskit::Test.warn "it { #{name} }" it { send(name, **) } end define_method("it_#{name}_together") do |*args, **| Syskit::Test.warn "class-level it_#{name}_together is deprecated, replace by" Syskit::Test.warn "it { #{name}(a_def, another_def) }" it { send(name, *args, **) } end end |
.find_definition(name) ⇒ Object
47 48 49 |
# File 'lib/syskit/test/profile_test.rb', line 47 def find_definition(name) subject_syskit_model.resolved_definition(name) end |
.find_device(name) ⇒ Object
51 52 53 |
# File 'lib/syskit/test/profile_test.rb', line 51 def find_device(name) subject_syskit_model.robot.devices[name] end |
.find_through_method_missing(m, args) ⇒ Object
62 63 64 65 66 67 |
# File 'lib/syskit/test/profile_test.rb', line 62 def find_through_method_missing(m, args) MetaRuby::DSLs.find_through_method_missing( self, m, args, '_def'.freeze => :find_definition, '_dev'.freeze => :find_device) || super end |
.has_through_method_missing?(m) ⇒ Boolean
55 56 57 58 59 60 |
# File 'lib/syskit/test/profile_test.rb', line 55 def has_through_method_missing?(m) MetaRuby::DSLs.has_through_method_missing?( self, m, '_def'.freeze => :find_definition, '_dev'.freeze => :find_device) || super end |
.it_should_be_self_contained(*definitions) ⇒ Object
replace by it { is_self_contained } it { is_self_contained(a_def, another_def) }
43 44 45 |
# File 'lib/syskit/test/profile_test.rb', line 43 def it_should_be_self_contained(*definitions) it { is_self_contained(*definitions) } end |
Instance Method Details
#find_through_method_missing(m, args) ⇒ Object
76 77 78 |
# File 'lib/syskit/test/profile_test.rb', line 76 def find_through_method_missing(m, args) self.class.find_through_method_missing(m, args) || super end |
#has_through_method_missing?(m) ⇒ Boolean
72 73 74 |
# File 'lib/syskit/test/profile_test.rb', line 72 def has_through_method_missing?(m) self.class.has_through_method_missing?(m) || super end |