0

YAMLファイルをロードし、属性が存在するかどうか、属性が空白であるか、属性の値など、ファイルの内容をチェックするRspecでテストケースを作成しようとしています。これは可能ですか?

例 Yaml :

name: Testing
role: admin,dev

これまでのところ、ファイルの存在を確認できます

describe file('/var/test.yml') do
  it { should exist }
  // need to test if attribute admin is present or not. If present the value contains admin or not
  
end

4

0 に答える 0