spec/lib/formats/rawyaml_spec.rb in hieracles-0.2.0 vs spec/lib/formats/rawyaml_spec.rb in hieracles-0.2.1
- old
+ new
@@ -15,9 +15,22 @@
)
}
it { expect(yaml_format.info nil).to eq expected }
end
+ describe ".facts" do
+ let(:expected) {"---\nNode: fqdn\nFarm: farm\n"}
+ before {
+ allow(node).to receive(:facts).and_return(
+ {
+ 'Node' => 'fqdn',
+ 'Farm' => 'farm'
+ }
+ )
+ }
+ it { expect(yaml_format.facts nil).to eq expected }
+ end
+
describe ".files" do
let(:expected) { "---\n- path1\n- path2\n" }
before {
allow(node).to receive(:files).and_return(['path1', 'path2'])
}