From fe111abd736b3ac254e3bf5e73a18bf28e3656f1 Mon Sep 17 00:00:00 2001 From: Ivan Larionov Date: Sun, 1 Jun 2014 13:13:11 +0400 Subject: [CHEF-3399] Tests: check data_bag_path instead of @paths. --- spec/unit/data_bag_spec.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'spec/unit/data_bag_spec.rb') diff --git a/spec/unit/data_bag_spec.rb b/spec/unit/data_bag_spec.rb index a35e3d2aa6..167c1b4134 100644 --- a/spec/unit/data_bag_spec.rb +++ b/spec/unit/data_bag_spec.rb @@ -183,7 +183,7 @@ describe Chef::DataBag do file_dir_stub(path) item_with_different_content = "{\"id\": \"bar\", \"name\": \"Bob Bar\", \"path\": \"#{path}\"}" IO.should_receive(:read).with(File.join(path, 'foo/bar.json')).and_return(item_with_different_content) - if @paths.size == 1 + if data_bag_path.is_a?(String) dir_glob_stub(path, [File.join(path, 'foo/bar.json'), File.join(path, 'foo/baz.json')]) item_2_with_different_content = '{"id": "bar", "name": "John Baz"}' IO.should_receive(:read).with(File.join(path, 'foo/baz.json')).and_return(item_2_with_different_content) -- cgit v1.2.1