summaryrefslogtreecommitdiff
path: root/spec/unit/deprecation_spec.rb
diff options
context:
space:
mode:
authorClaire McQuin <claire@getchef.com>2014-10-29 15:14:22 -0700
committerClaire McQuin <claire@getchef.com>2014-10-29 15:59:04 -0700
commit5fed7a65a2f024d964ecf2de1bcf2911cf8a600c (patch)
tree14cc6968e4fe4fd2485c0211088b25c645a80a4b /spec/unit/deprecation_spec.rb
parentb92c309b0f1aa0837f76ab89d6c81c36076ceca9 (diff)
downloadchef-5fed7a65a2f024d964ecf2de1bcf2911cf8a600c.tar.gz
Update to RSpec 3.
Diffstat (limited to 'spec/unit/deprecation_spec.rb')
-rw-r--r--spec/unit/deprecation_spec.rb10
1 files changed, 5 insertions, 5 deletions
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