Skip to content

Commit

Permalink
test: fix to_yaml nil value representation for mac (#496)
Browse files Browse the repository at this point in the history
  • Loading branch information
jphaward authored Oct 20, 2023
1 parent 1cb5aa1 commit 535ebbe
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions spec/granite_spec.cr
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down

0 comments on commit 535ebbe

Please sign in to comment.