Originate/scriptkeeper

unmockedCommands cannot be specified when protocols

Closed this issue · 1 comments

if we specify a single protocol, other top level fields such as unmockedCommands (and eventually interpreter) will not be parsed. If added to load::unmocked_commands in src/lib.rs this test will fail:

#[test]
fn allows_to_specify_unmocked_commands_huhu() -> R<()> {
    let tempfile = TempFile::new()?;
    assert_eq!(
        test_parse(
            &tempfile,
            r##"
                |protocol: []
                |unmockedCommands:
                |  - foo
            "##
        )?
        .unmocked_commands
        .map(|command| String::from_utf8(command).unwrap()),
        vec!["foo"]
    );
    Ok(())
}

Closing, this is a duplicate of #38.