summaryrefslogtreecommitdiff
path: root/spec/unit/data_bag_item_spec.rb
diff options
context:
space:
mode:
Diffstat (limited to 'spec/unit/data_bag_item_spec.rb')
-rw-r--r--spec/unit/data_bag_item_spec.rb6
1 files changed, 3 insertions, 3 deletions
diff --git a/spec/unit/data_bag_item_spec.rb b/spec/unit/data_bag_item_spec.rb
index 7a0d3575fb..109cd76ef8 100644
--- a/spec/unit/data_bag_item_spec.rb
+++ b/spec/unit/data_bag_item_spec.rb
@@ -203,7 +203,7 @@ describe Chef::DataBagItem do
describe "save" do
before do
- @rest = mock("Chef::REST")
+ @rest = double("Chef::REST")
Chef::REST.stub(:new).and_return(@rest)
@data_bag_item['id'] = "heart of darkness"
raw_data = {"id" => "heart_of_darkness", "author" => "Conrad"}
@@ -216,7 +216,7 @@ describe Chef::DataBagItem do
end
it "should create if the item is not found" do
- exception = mock("404 error", :code => "404")
+ exception = double("404 error", :code => "404")
@rest.should_receive(:put_rest).and_raise(Net::HTTPServerException.new("foo", exception))
@rest.should_receive(:post_rest).with("data/books", @data_bag_item)
@data_bag_item.save
@@ -247,7 +247,7 @@ describe Chef::DataBagItem do
describe "from an API call" do
before do
- @http_client = mock("Chef::REST")
+ @http_client = double("Chef::REST")
Chef::REST.stub(:new).and_return(@http_client)
end