Module: Syskit::Test::FlexMockExtension

Included in:
Syskit::Test
Defined in:
lib/syskit/test/flexmock_extension.rb

Overview

Module containing extensions to flexmock to ease testing syskit objects

Instance Method Summary collapse

Instance Method Details

#should_receive_operation(*args) ⇒ Object

Specifies that an operation is expected to be called. The mocked object is the Syskit taskcontext (NOT the orocos task context)



8
9
10
11
12
13
# File 'lib/syskit/test/flexmock_extension.rb', line 8

def should_receive_operation(*args)
    if !@obj.orocos_task
        @obj.execution_agent.start!
    end
    flexmock_container.flexmock(@obj.orocos_task).should_receive(*args)
end