diff options
author | Noah Kantrowitz <noah@coderanger.net> | 2018-06-14 20:47:13 -0700 |
---|---|---|
committer | Noah Kantrowitz <noah@coderanger.net> | 2018-06-14 20:47:13 -0700 |
commit | 7a12fa4b66d18b79233c2c29de5cead0ea0c1af9 (patch) | |
tree | 9b4737cb40edc2aa3174ba8de59982de46fa26c8 | |
parent | ba7e7e1f84df03454ec058e4a91114f93dc4553f (diff) | |
download | chef-7a12fa4b66d18b79233c2c29de5cead0ea0c1af9.tar.gz |
Fix some more tests.
Signed-off-by: Noah Kantrowitz <noah@coderanger.net>
-rw-r--r-- | spec/unit/chef_class_spec.rb | 4 | ||||
-rw-r--r-- | 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 |