Additional tests for cookbook generator

Also added a strip call to the keys and values, as `generator_context. key` is not a legal identifier (due to the space).