From 4eb645b26153b8464e4fa8cd797ebfeb9c109bb3 Mon Sep 17 00:00:00 2001 From: Andrew Carter Date: Thu, 20 Mar 2025 16:52:59 -0700 Subject: [PATCH] Fix category regex in test expectations YAML values for empty categories should be nil not a space. --- spec/compose_spec.rb | 6 +++--- spec/draft_spec.rb | 2 +- spec/post_spec.rb | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/spec/compose_spec.rb b/spec/compose_spec.rb index 9526345..71b0d00 100644 --- a/spec/compose_spec.rb +++ b/spec/compose_spec.rb @@ -145,7 +145,7 @@ capture_stdout { described_class.process(args) } post = File.read(path) expect(post).to match(%r!description: my description!) - expect(post).to match(%r!category: !) + expect(post).to match(%r!category:!) end context "env variable EDITOR is set up" do @@ -332,7 +332,7 @@ capture_stdout { described_class.process(args, options) } post = File.read(path) expect(post).to match(%r!description: my description!) - expect(post).to match(%r!category: !) + expect(post).to match(%r!category:!) end context "env variable EDITOR is set up" do @@ -513,7 +513,7 @@ capture_stdout { described_class.process(args, options) } post = File.read(path) expect(post).to match(%r!description: my description!) - expect(post).to match(%r!category: !) + expect(post).to match(%r!category:!) end context "env variable EDITOR is set up" do diff --git a/spec/draft_spec.rb b/spec/draft_spec.rb index 8b7eae6..82708ba 100644 --- a/spec/draft_spec.rb +++ b/spec/draft_spec.rb @@ -118,7 +118,7 @@ capture_stdout { described_class.process(args) } post = File.read(path) expect(post).to match(%r!description: my description!) - expect(post).to match(%r!category: !) + expect(post).to match(%r!category:!) end context "env variable EDITOR is set up" do diff --git a/spec/post_spec.rb b/spec/post_spec.rb index f78d66c..31e0518 100644 --- a/spec/post_spec.rb +++ b/spec/post_spec.rb @@ -129,7 +129,7 @@ capture_stdout { described_class.process(args) } post = File.read(path) expect(post).to match(%r!description: my description!) - expect(post).to match(%r!category: !) + expect(post).to match(%r!category:!) end context "env variable EDITOR is set up" do