spec/lib/formats/csv_spec.rb in hieracles-0.2.0 vs spec/lib/formats/csv_spec.rb in hieracles-0.2.1
- old
+ new
@@ -17,9 +17,24 @@
it "outputs proper text" do
expect(csv_format.info nil).to eq expected
end
end
+ describe ".facts" do
+ let(:expected) {"Node;Farm\nfqdn;farm\n"}
+ before {
+ allow(node).to receive(:facts).and_return(
+ {
+ 'Node' => 'fqdn',
+ 'Farm' => 'farm'
+ }
+ )
+ }
+ it "outputs proper text" do
+ expect(csv_format.facts nil).to eq expected
+ end
+ end
+
describe ".files" do
let(:expected) { "path1;path2\n" }
before {
allow(node).to receive(:files).and_return(['path1', 'path2'])
}