From 7a12fa4b66d18b79233c2c29de5cead0ea0c1af9 Mon Sep 17 00:00:00 2001 From: Noah Kantrowitz Date: Thu, 14 Jun 2018 20:47:13 -0700 Subject: Fix some more tests. Signed-off-by: Noah Kantrowitz --- spec/unit/chef_class_spec.rb | 4 ++-- spec/unit/deprecated_spec.rb | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/spec/unit/chef_class_spec.rb b/spec/unit/chef_class_spec.rb index f9ea00090e..2f370388fa 100644 --- a/spec/unit/chef_class_spec.rb +++ b/spec/unit/chef_class_spec.rb @@ -113,7 +113,7 @@ describe "Chef class" do before { Chef::Config[:treat_deprecation_warnings_as_errors] = false } it "displays a simple deprecation warning" do - expect(Chef::Log).to receive(:warn).with(%r{I'm a little teapot\..*?spec/unit/chef_class_spec\.rb.*?Please see}m) + expect(Chef::Log).to receive(:warn).with(%r{spec/unit/chef_class_spec\.rb.*?I'm a little teapot.*?Please see}m) Chef.deprecated(:generic, "I'm a little teapot.") end @@ -222,7 +222,7 @@ describe "Chef class" do before { Chef::Config[:treat_deprecation_warnings_as_errors] = true } it "displays a simple deprecation error" do - expect(Chef::Log).to receive(:error).with(%r{I'm a little teapot\..*?spec/unit/chef_class_spec\.rb.*?Please see}m) + expect(Chef::Log).to receive(:error).with(%r{spec/unit/chef_class_spec\.rb.*?I'm a little teapot.*?Please see}m) expect { Chef.deprecated(:generic, "I'm a little teapot.") }.to raise_error(/I'm a little teapot./) end end diff --git a/spec/unit/deprecated_spec.rb b/spec/unit/deprecated_spec.rb index 0876b73dce..9c60080cef 100644 --- a/spec/unit/deprecated_spec.rb +++ b/spec/unit/deprecated_spec.rb @@ -48,7 +48,7 @@ describe Chef::Deprecated do end it "formats a complete deprecation message" do - expect(TestDeprecation.new(message, location).to_s).to eql("A test message (CHEF-999)the location.\nPlease see https://docs.chef.io/deprecations_test.html for further details and information on how to correct this problem.") + expect(TestDeprecation.new(message, location).to_s).to eql("Deprecation CHEF-999 from the location\n\n A test message\n\nPlease see https://docs.chef.io/deprecations_test.html for further details and information on how to correct this problem.") end end -- cgit v1.2.1