From 5fed7a65a2f024d964ecf2de1bcf2911cf8a600c Mon Sep 17 00:00:00 2001 From: Claire McQuin Date: Wed, 29 Oct 2014 15:14:22 -0700 Subject: Update to RSpec 3. --- spec/unit/deprecation_spec.rb | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'spec/unit/deprecation_spec.rb') diff --git a/spec/unit/deprecation_spec.rb b/spec/unit/deprecation_spec.rb index c5ab41fbab..9bd081a6c4 100644 --- a/spec/unit/deprecation_spec.rb +++ b/spec/unit/deprecation_spec.rb @@ -54,7 +54,7 @@ describe Chef::Deprecation do it "defines all methods on #{class_object} that were available in 11.0" do old_methods.each do |old_method| - current_methods.should include(old_method.to_sym) + expect(current_methods).to include(old_method.to_sym) end end end @@ -62,24 +62,24 @@ describe Chef::Deprecation do context 'deprecation warning messages' do before(:each) do @warning_output = [ ] - Chef::Log.stub(:warn) { |msg| @warning_output << msg } + allow(Chef::Log).to receive(:warn) { |msg| @warning_output << msg } end it 'should be enabled for deprecated methods' do TestClass.new.deprecated_method(10) - @warning_output.should_not be_empty + expect(@warning_output).not_to be_empty end it 'should contain stack trace' do TestClass.new.deprecated_method(10) - @warning_output.join("").include?(".rb").should be_true + expect(@warning_output.join("").include?(".rb")).to be_truthy end end it 'deprecated methods should still be called' do test_instance = TestClass.new test_instance.deprecated_method(10) - test_instance.get_value.should == 10 + expect(test_instance.get_value).to eq(10) end end -- cgit v1.2.1