From 535ebbebf0c512afdd8bf2e46bced38dce244f86 Mon Sep 17 00:00:00 2001 From: jphaward Date: Fri, 20 Oct 2023 15:37:19 +0100 Subject: [PATCH] test: fix to_yaml nil value representation for mac (#496) --- spec/granite_spec.cr | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/spec/granite_spec.cr b/spec/granite_spec.cr index 20e807b9..2b40e935 100644 --- a/spec/granite_spec.cr +++ b/spec/granite_spec.cr @@ -264,11 +264,8 @@ describe Granite::Base do describe "#to_yaml" do it "emits nil values when told" do t = TodoEmitNull.new(name: "test todo", priority: 20) - result = {% if flag?(:darwin) %} - %(---\nid:\nname: test todo\npriority: 20\ncreated_at:\nupdated_at:\n) - {% else %} - %(---\nid: \nname: test todo\npriority: 20\ncreated_at: \nupdated_at: \n) - {% end %} + result = %(---\nid: \nname: test todo\npriority: 20\ncreated_at: \nupdated_at: \n) + t.to_yaml.should eq result end