def test_argument_checkset
init_arguments
assert_equal({ 'foo' => false,
'bar' => false,
'baz' => false
}, @entry.args[8])
@entry.set_arg_at(8, {
'foo' => true,
'bar' => false,
'baz' => false
})
assert_equal({ 'foo' => true,
'bar' => false,
'baz' => false
}, @entry.args[8])
assert_exception(RuntimeError) {
@entry.set_arg_at(8, nil)
}
assert_exception(RuntimeError) {
@entry.set_arg_at(8, 'checkset')
}
assert_exception(RuntimeError) {
@entry.set_arg_at(8, { 'foo' => true })
}
assert_exception(RuntimeError) {
@entry.set_arg_at(8, {
'foo' => true,
'bar' => false,
'baz' => false,
'qux' => false
})
}
assert_exception(RuntimeError) {
@entry.set_arg_at(8, {
'foo' => false,
'bar' => false,
'baz' => nil
})
}
end