summaryrefslogtreecommitdiff
path: root/spec/unit/knife
diff options
context:
space:
mode:
authordanielsdeleo <dan@getchef.com>2014-08-08 15:55:28 -0700
committerdanielsdeleo <dan@getchef.com>2014-08-10 09:40:36 -0700
commit11f7b2c725db4384787f76c4c5229f98c8694e95 (patch)
treeec99bf199d8a9fe14c90aab2e234a219b2bd447c /spec/unit/knife
parent674cc65dc68b9d5f0eaa36f2409c6c12becf2c11 (diff)
downloadchef-11f7b2c725db4384787f76c4c5229f98c8694e95.tar.gz
Fix expected format of JSON errors in integration tests
The format was previously not stable because chef-zero (or other test code) would `require 'json'` and undo ffi-yajl's monkey patches to the JSON gem. We would probably be better off if we can get out of the business of monkeypatching JSON or attempting to provide compatibility at all, in which case this commit could be reverted.
Diffstat (limited to 'spec/unit/knife')
-rw-r--r--spec/unit/knife/data_bag_from_file_spec.rb2
1 files changed, 0 insertions, 2 deletions
diff --git a/spec/unit/knife/data_bag_from_file_spec.rb b/spec/unit/knife/data_bag_from_file_spec.rb
index 8537045164..1ad6b4712c 100644
--- a/spec/unit/knife/data_bag_from_file_spec.rb
+++ b/spec/unit/knife/data_bag_from_file_spec.rb
@@ -21,7 +21,6 @@ require 'spec_helper'
require 'chef/data_bag_item'
require 'chef/encrypted_data_bag_item'
require 'tempfile'
-require 'json'
Chef::Knife::DataBagFromFile.load_deps
@@ -86,7 +85,6 @@ describe Chef::Knife::DataBagFromFile do
end
it "loads all from a folder and saves" do
- dir = File.dirname(@db_file.path)
@knife.name_args = [ 'bag_name', @db_folder ]
@knife.loader.should_receive(:load_from).with("data_bags", 'bag_name', @db_file.path).and_return(@plain_data)
@knife.loader.should_receive(:load_from).with("data_bags", 'bag_name', @db_file2.path).and_return(@plain_data)