Module: OroGen::SelfTest

Included in:
Minitest::Test
Defined in:
lib/orogen/test.rb

Constant Summary collapse

TEST_DIR =
File.expand_path(File.join('..', '..', '..', 'test'), __FILE__)
TEST_DATA_DIR =
File.join( TEST_DIR, 'data' )
WC_ROOT =
File.join(TEST_DIR, 'wc')

Instance Method Summary collapse

Instance Method Details

#create_dummy_projectObject



56
57
58
59
60
# File 'lib/orogen/test.rb', line 56

def create_dummy_project
    loader = OroGen::Loaders::Files.new
    OroGen::Loaders::RTT.setup_loader(loader)
    OroGen::Spec::Project.new(loader)
end

#path_to_dataString

Returns the full path to oroGen's test/data folder, where fixtures are stored

Returns:

  • (String)

    the full path to oroGen's test/data folder, where fixtures are stored



46
47
48
# File 'lib/orogen/test.rb', line 46

def path_to_data
    TEST_DATA_DIR
end

#path_to_testObject

Overload of test_dir for use in specs, as test_* is somewhat hidden by minitest



40
41
42
# File 'lib/orogen/test.rb', line 40

def path_to_test
    TEST_DIR
end

#path_to_wc_rootString

Returns the full path to oroGen's test/wc folder, where code is being generated by the tests

Returns:

  • (String)

    the full path to oroGen's test/wc folder, where code is being generated by the tests



52
53
54
# File 'lib/orogen/test.rb', line 52

def path_to_wc_root
    WC_ROOT
end

#setupObject



62
63
64
# File 'lib/orogen/test.rb', line 62

def setup
    # Setup code for all the tests
end

#teardownObject



66
67
68
# File 'lib/orogen/test.rb', line 66

def teardown
    # Teardown code for all the tests
end